summaryrefslogtreecommitdiff
path: root/src/shared/logs-show.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/logs-show.c')
-rw-r--r--src/shared/logs-show.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/shared/logs-show.c b/src/shared/logs-show.c
index 8dc11bb7fd..ea4746879b 100644
--- a/src/shared/logs-show.c
+++ b/src/shared/logs-show.c
@@ -1059,7 +1059,12 @@ int show_journal_by_unit(
if (r < 0)
return r;
- log_debug("Journal filter: %s", journal_make_match_string(j));
+ if (_unlikely_(log_get_max_level() >= LOG_PRI(LOG_DEBUG))) {
+ _cleanup_free_ char *filter;
+
+ filter = journal_make_match_string(j);
+ log_debug("Journal filter: %s", filter);
+ }
r = show_journal(f, j, mode, n_columns, not_before, how_many, flags);
if (r < 0)