summaryrefslogtreecommitdiff
path: root/src/journal
diff options
context:
space:
mode:
Diffstat (limited to 'src/journal')
-rw-r--r--src/journal/journalctl.c7
-rw-r--r--src/journal/sd-journal.c2
2 files changed, 7 insertions, 2 deletions
diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c
index 7415abc74f..7099706696 100644
--- a/src/journal/journalctl.c
+++ b/src/journal/journalctl.c
@@ -1408,7 +1408,12 @@ int main(int argc, char *argv[]) {
if (r < 0)
return EXIT_FAILURE;
- log_debug("Journal filter: %s", j->level0 ? journal_make_match_string(j) : "none");
+ 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);
+ }
if (arg_field) {
const void *data;
diff --git a/src/journal/sd-journal.c b/src/journal/sd-journal.c
index 81b0c136f5..a83c0c25bf 100644
--- a/src/journal/sd-journal.c
+++ b/src/journal/sd-journal.c
@@ -362,7 +362,7 @@ static char *match_make_string(Match *m) {
bool enclose = false;
if (!m)
- return strdup("");
+ return strdup("none");
if (m->type == MATCH_DISCRETE)
return strndup(m->data, m->size);