追踪框架
正如“跟踪框架”页面中所解释的那样,SmartEDB 提供了允许应用程序将跟踪和调试信息输出到日志文件的 API。有关各种跟踪选项的详细信息,请查看 C API 跟踪框架页面。对于 xSQL,这些选项在配置文件的 trace_params 部分中指定。
配置文件示例
以下配置文件示例展示了如何设置各种跟踪选项:
# Tracing parameters
trace_params :
{
# Specifies filename where tracing will go. It's possible to specify "stderr"
# to pass all the messages to standard error stream
file : "xsql.log",
# Format for the messages. Format specifiers are: %s and %e
format: "%s: %e",
# Maximum severity for messages appearing in the trace file
# Possible values are: verbose, debug, info, notice, warning, error, fatal
severity: info
# Options that control if the file will be closed and reopened for each written record.
# Possible values are: leave_opened, keep_closed
options: keep_closed
}