From 50f72bca65ad291685e5b79903cb6ac3fbc8364d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Wed, 11 Dec 2013 20:34:19 -0500 Subject: [PATCH] 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. --- src/shared/log.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/shared/log.c b/src/shared/log.c index 2531e0da0..c654b8622 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); -- 2.30.2