diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-12-11 20:34:19 -0500 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2013-12-11 22:26:55 -0500 |
commit | 50f72bca65ad291685e5b79903cb6ac3fbc8364d (patch) | |
tree | 327a8c34432c62952d6007119594d1e9790c65d1 /src/shared | |
parent | faf5077f891aa249270b2a3d9f0104c3eec02da6 (diff) |
Do not log all assert_return failures
% build/journalctl help
Assertion 'match_is_valid(data, size)' failed at ../src/journal/sd-journal.c:227, function sd_journal_add_match(). Ignoring.
Callers cannot be expect to check all arguments always.
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/log.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/shared/log.c b/src/shared/log.c index 2531e0da03..c654b86228 100644 --- a/src/shared/log.c +++ b/src/shared/log.c @@ -690,6 +690,9 @@ int log_meta_object( static void log_assert(int level, const char *text, const char *file, int line, const char *func, const char *format) { static char buffer[LINE_MAX]; + if (_likely_(LOG_PRI(level) > log_max_level)) + return; + snprintf(buffer, sizeof(buffer), format, text, file, line, func); char_array_0(buffer); |