X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=src%2Flib%2Flib-logging.c;h=b1cab494abdd556c2b07dacfd224bdea5032ac32;hb=71436ae48cd2fcfcc59ae9a7da909e29a191145c;hp=50552854175622cafadcec410859052c2c475f48;hpb=78c888d139a40b58b10a2c92829cbb2c814ad766;p=babeltrace.git diff --git a/src/lib/lib-logging.c b/src/lib/lib-logging.c index 50552854..b1cab494 100644 --- a/src/lib/lib-logging.c +++ b/src/lib/lib-logging.c @@ -1479,13 +1479,13 @@ update_fmt: * exposed, but not part of the public ABI. */ BT_EXPORT -void bt_lib_log_v(const char *func, const char *file, unsigned line, +void bt_lib_log_v(const char *file, const char *func, unsigned line, int lvl, const char *tag, const char *fmt, va_list *args) { BT_ASSERT(fmt); bt_common_custom_vsnprintf(lib_logging_buf, LIB_LOGGING_BUF_SIZE, '!', handle_conversion_specifier_bt, NULL, fmt, args); - _bt_log_write_d(func, file, line, lvl, tag, "%s", lib_logging_buf); + bt_log_write(file, func, line, lvl, tag, lib_logging_buf); } /* @@ -1495,14 +1495,14 @@ void bt_lib_log_v(const char *func, const char *file, unsigned line, * exposed, but not part of the public ABI. */ BT_EXPORT -void bt_lib_log(const char *func, const char *file, unsigned line, +void bt_lib_log(const char *file, const char *func, unsigned line, int lvl, const char *tag, const char *fmt, ...) { va_list args; BT_ASSERT(fmt); va_start(args, fmt); - bt_lib_log_v(func, file, line, lvl, tag, fmt, &args); + bt_lib_log_v(file, func, line, lvl, tag, fmt, &args); va_end(args); } @@ -1528,8 +1528,7 @@ void bt_lib_maybe_log_and_append_cause(const char *func, const char *file, /* Log conditionally, but always append the error cause */ if (BT_LOG_ON(lvl)) { - _bt_log_write_d(func, file, line, lvl, tag, "%s", - lib_logging_buf); + bt_log_write(file, func, line, lvl, tag, lib_logging_buf); } status = bt_current_thread_error_append_cause_from_unknown(