Callback function to handle trace messages.
When any database operation triggers a trace message a user-define callback function is called which has the following prototype:
typedef int (*mco_trace_message_handler_fn)(mco_severity severity,
mco_trace_module module,
const char *file,
int line,
const char *fmt, ...);
severity
mco_severity) are:module
mco_trace_module.file
line
fmt
...
fmt.
MCO_TRACE_FATAL
MCO_TRACE_ERROR
MCO_TRACE_WARNING
MCO_TRACE_NOTICE
MCO_TRACE_INFO
MCO_TRACE_DEBUG
MCO_TRACE_VERBOSE
%t - message time
%m - module
%i - thread id
%s - severity
%f - source code file
%l - source code line
%e - error text
%r - print errno
%R - print errno with string representation
This callback function is called when any database operation triggers a trace message. Note that this custom handler must be registered with function
mco_trace_set_handler().
int
MCO_S_OK) or an error code.