test: add log_extra().

This commit is contained in:
Leo Yuriev 2017-05-17 18:49:19 +03:00
parent 677625ead1
commit ec114d06b7
3 changed files with 12 additions and 1 deletions

View File

@ -205,6 +205,16 @@ local_suffix::~local_suffix() { suffix.erase(trim_pos); }
} /* namespace log */
void log_extra(const char *msg, ...) {
if (logging::extra >= logging::level) {
va_list ap;
va_start(ap, msg);
logging::output(logging::extra, msg, ap);
va_end(ap);
} else
logging::last = nullptr;
}
void log_trace(const char *msg, ...) {
if (logging::trace >= logging::level) {
va_list ap;

View File

@ -72,6 +72,7 @@ public:
} /* namespace log */
void __printf_args(1, 2) log_extra(const char *msg, ...);
void __printf_args(1, 2) log_trace(const char *msg, ...);
void __printf_args(1, 2) log_verbose(const char *msg, ...);
void __printf_args(1, 2) log_info(const char *msg, ...);

View File

@ -67,7 +67,7 @@ static void mdbx_debug_logger(int type, const char *function, int line,
level = logging::failure;
}
if (logging::output(level, "mdbx: "))
if (logging::output(level, "mdbx: %s: ", function))
logging::feed(msg, args);
if (type & MDBX_DBG_ASSERT)
abort();