log: fix syslog not respecting the configured log level

This commit is contained in:
Daniel Eklöf 2024-04-05 16:19:24 +02:00
parent 3cc94ab4e8
commit 4f1aaccf81
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
2 changed files with 7 additions and 0 deletions

3
log.c
View file

@ -105,6 +105,9 @@ _sys_log(enum log_class log_class, const char *module,
if (!do_syslog)
return;
if (log_class > log_level)
return;
/* Map our log level to syslog's level */
int level = log_level_map[log_class].syslog_equivalent;