summaryrefslogtreecommitdiff
path: root/src/basic/log.h
diff options
context:
space:
mode:
authorDaan De Meyer <daan.j.demeyer@gmail.com>2022-11-16 11:37:14 +0100
committerDaan De Meyer <daan.j.demeyer@gmail.com>2022-11-16 11:37:14 +0100
commita423050e28a71a6132a0eb3fc6453437f864a121 (patch)
tree99afbc92fbc38312c4a967c35b30d1fdd2b9e4b7 /src/basic/log.h
parent8522691d4dafda542a65b1113128ac7d689302ac (diff)
downloadsystemd-a423050e28a71a6132a0eb3fc6453437f864a121.tar.gz
log: Disable log rate limiting if debug logging is enabled
When debugging, it makes sense to not do any rate limiting at all.
Diffstat (limited to 'src/basic/log.h')
-rw-r--r--src/basic/log.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/basic/log.h b/src/basic/log.h
index f412caee5b..040b7eb07b 100644
--- a/src/basic/log.h
+++ b/src/basic/log.h
@@ -388,7 +388,7 @@ typedef struct LogRateLimit {
_log_ratelimit.error = _log_ratelimit_error; \
_log_ratelimit.level = _log_ratelimit_level; \
} \
- if (ratelimit_below(&_log_ratelimit.ratelimit)) \
+ if (log_get_max_level() == LOG_DEBUG || ratelimit_below(&_log_ratelimit.ratelimit)) \
_log_ratelimit_error = _num_dropped_errors > 0 \
? log_internal(_log_ratelimit_level, _log_ratelimit_error, _file, _line, _func, _format " (Dropped %u similar message(s))", ##__VA_ARGS__, _num_dropped_errors) \
: log_internal(_log_ratelimit_level, _log_ratelimit_error, _file, _line, _func, _format, ##__VA_ARGS__); \