summaryrefslogtreecommitdiff
path: root/src/shared/log.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-12-11 20:34:19 -0500
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-12-11 22:26:55 -0500
commit50f72bca65ad291685e5b79903cb6ac3fbc8364d (patch)
tree327a8c34432c62952d6007119594d1e9790c65d1 /src/shared/log.c
parentfaf5077f891aa249270b2a3d9f0104c3eec02da6 (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/log.c')
-rw-r--r--src/shared/log.c3
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);