mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-25 06:02:08 +00:00
BUG/MINOR: da: fix log-level comparison to emove annoying warning
When haproxy is run on the foreground with DeviceAtlas enabled, one line of warning is seen for every test because the comparison is always true even when loglevel is zero : willy@wtap:haproxy$ ./haproxy -db -f test-da.cfg [WARNING] 151/150831 (25506) : deviceatlas : final memory image 7148029 bytes. Deviceatlas module loaded. [WARNING] 151/150832 (25506) : deviceatlas : . [WARNING] 151/150833 (25506) : deviceatlas : . [WARNING] 151/150833 (25506) : deviceatlas : . ^C Don't emit a warning when loglevel is null.
This commit is contained in:
parent
b5efa0149f
commit
6bd42e7f41
2
src/da.c
2
src/da.c
@ -70,7 +70,7 @@ static da_status_t da_haproxy_seek(void *ctx, off_t off)
|
||||
static void da_haproxy_log(da_severity_t severity, da_status_t status,
|
||||
const char *fmt, va_list args)
|
||||
{
|
||||
if (severity <= global.deviceatlas.loglevel) {
|
||||
if (global.deviceatlas.loglevel && severity <= global.deviceatlas.loglevel) {
|
||||
char logbuf[256];
|
||||
vsnprintf(logbuf, sizeof(logbuf), fmt, args);
|
||||
Warning("deviceatlas : %s.\n", logbuf);
|
||||
|
Loading…
Reference in New Issue
Block a user