mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-09-21 22:01:31 +02:00
MINOR: log: introduce ha_notice()
It's like ha_warning() or ha_alert() but with a NOTICE prefix.
This commit is contained in:
parent
944e619b64
commit
9c56a22b20
@ -110,6 +110,12 @@ void ha_alert(const char *fmt, ...)
|
||||
void ha_warning(const char *fmt, ...)
|
||||
__attribute__ ((format(printf, 1, 2)));
|
||||
|
||||
/*
|
||||
* Displays the message on stderr with the date and pid.
|
||||
*/
|
||||
void ha_notice(const char *fmt, ...)
|
||||
__attribute__ ((format(printf, 1, 2)));
|
||||
|
||||
/*
|
||||
* Displays the message on <out> only if quiet mode is not set.
|
||||
*/
|
||||
|
14
src/log.c
14
src/log.c
@ -921,6 +921,20 @@ void ha_warning(const char *fmt, ...)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Displays the message on stderr with the date and pid.
|
||||
*/
|
||||
void ha_notice(const char *fmt, ...)
|
||||
{
|
||||
va_list argp;
|
||||
|
||||
if (!(global.mode & MODE_QUIET) || (global.mode & MODE_VERBOSE)) {
|
||||
va_start(argp, fmt);
|
||||
print_message("NOTICE", fmt, argp);
|
||||
va_end(argp);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Displays the message on <out> only if quiet mode is not set.
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user