chiark / gitweb /
coredumpctl: add more debug output
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 2 Aug 2013 11:58:26 +0000 (07:58 -0400)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 2 Aug 2013 14:49:07 +0000 (10:49 -0400)
It can be quite useful when somebody confuses _PID with COREDUMP_PID :).

Makefile.am
src/journal/coredumpctl.c

index e35eaeb73d961ce432f433c42129d4a5d7a826e1..a4b4cb46a046216ff8a041c444391b4f7904dca0 100644 (file)
@@ -3102,7 +3102,9 @@ systemd_coredumpctl_SOURCES = \
 
 systemd_coredumpctl_LDADD = \
        libsystemd-shared.la \
-       libsystemd-journal.la
+       libsystemd-journal.la \
+       libsystemd-journal-internal.la \
+       libsystemd-id128-internal.la
 
 bin_PROGRAMS += \
        systemd-coredumpctl
index e1bd8621e32c9023f26ff0d59f392305fd9c7599..75c96cc08112e41fff61c2181ba463dcfaf4bcaa 100644 (file)
@@ -342,7 +342,7 @@ static int dump_list(sd_journal *j) {
         assert(j);
 
         /* The coredumps are likely to compressed, and for just
-         * listing them we don#t need to decompress them, so let's
+         * listing them we don't need to decompress them, so let's
          * pick a fairly low data threshold here */
         sd_journal_set_data_threshold(j, 4096);
 
@@ -557,6 +557,13 @@ int main(int argc, char *argv[]) {
                 }
         }
 
+        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);
+        }
+
         switch(arg_action) {
 
         case ACTION_LIST: