From 50f72bca65ad291685e5b79903cb6ac3fbc8364d Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Wed, 11 Dec 2013 20:34:19 -0500 Subject: 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(+) (limited to 'src/shared') 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); -- cgit v1.2.3-54-g00ecf