summaryrefslogtreecommitdiffstats
path: root/src/basic/log.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/basic/log.c')
-rw-r--r--src/basic/log.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/basic/log.c b/src/basic/log.c
index a8056d2635..09500f9cb0 100644
--- a/src/basic/log.c
+++ b/src/basic/log.c
@@ -396,9 +396,10 @@ void log_forget_fds(void) {
console_fd_is_tty = -1;
}
-void log_set_max_level(int level) {
+int log_set_max_level(int level) {
assert(level == LOG_NULL || LOG_PRI(level) == level);
+ int old = log_max_level;
log_max_level = level;
/* Also propagate max log level to libc's syslog(), just in case some other component loaded into our
@@ -411,6 +412,8 @@ void log_set_max_level(int level) {
/* Ensure that our own LOG_NULL define maps sanely to the log mask */
assert_cc(LOG_UPTO(LOG_NULL) == 0);
+
+ return old;
}
void log_set_facility(int facility) {