diff --git a/debian/libwsutil0.symbols b/debian/libwsutil0.symbols index 511f0d0f34..b448f98bfe 100644 --- a/debian/libwsutil0.symbols +++ b/debian/libwsutil0.symbols @@ -239,6 +239,7 @@ libwsutil.so.0 libwsutil0 #MINVER# ws_log_set_level@Base 3.5.0 ws_log_set_level_str@Base 3.5.0 ws_logv@Base 3.5.0 + ws_logv_full@Base 3.5.0 ws_mempbrk_compile@Base 1.99.4 ws_mempbrk_exec@Base 1.99.4 ws_pipe_close@Base 2.6.5 diff --git a/wsutil/wslog.c b/wsutil/wslog.c index 7ae9c9b2be..d1cd117ec2 100644 --- a/wsutil/wslog.c +++ b/wsutil/wslog.c @@ -419,6 +419,20 @@ void ws_logv(const char *domain, enum ws_log_level level, } +void ws_logv_full(const char *domain, enum ws_log_level level, + const char *file, int line, const char *func, + const char *format, va_list ap) +{ + if (domain == NULL || domain[0] == '\0') + domain = LOG_DOMAIN_DEFAULT; + + if (log_drop_message(domain, level)) + return; + + log_write_dispatch(domain, level, file, line, func, format, ap); +} + + void ws_log(const char *domain, enum ws_log_level level, const char *format, ...) { diff --git a/wsutil/wslog.h b/wsutil/wslog.h index 04a0dd7ad6..fa7dba3170 100644 --- a/wsutil/wslog.h +++ b/wsutil/wslog.h @@ -168,6 +168,17 @@ void ws_log_full(const char *domain, enum ws_log_level level, const char *format, ...) G_GNUC_PRINTF(6,7); +/** This function is called to output a message to the log. + * + * In addition to the message this function accepts file/line/function + * information. 'func' may be NULL. + */ +WS_DLL_PUBLIC +void ws_logv_full(const char *domain, enum ws_log_level level, + const char *file, int line, const char *func, + const char *format, va_list ap); + + #define _LOG_FULL(level, ...) ws_log_full(WS_LOG_DOMAIN, level, \ __FILE__, __LINE__, G_STRFUNC, __VA_ARGS__)