forked from osmocom/wireshark
wslog: Add ws_logv_full()
This commit is contained in:
parent
e37b2ae637
commit
2c6d897b58
|
@ -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
|
||||
|
|
|
@ -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, ...)
|
||||
{
|
||||
|
|
|
@ -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__)
|
||||
|
||||
|
|
Loading…
Reference in New Issue