aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2014-10-14 00:09:12 +0200
committerGravatar Christian Hesse <mail@eworm.de>2014-10-14 00:09:12 +0200
commite64b0040cd203659265e884989daf23dd1fcc641 (patch)
treecae60487f2d0f53cf5ae22565ef1175216833b79
parentc34ea723a1f5447b5138c4d1ef8461f264979762 (diff)
downloadjournal-notify-e64b0040cd203659265e884989daf23dd1fcc641.tar.gz
journal-notify-e64b0040cd203659265e884989daf23dd1fcc641.tar.zst
add some more verbose output
-rw-r--r--journal-notify.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/journal-notify.c b/journal-notify.c
index ea73666..0dbb83a 100644
--- a/journal-notify.c
+++ b/journal-notify.c
@@ -179,6 +179,8 @@ int main(int argc, char **argv) {
fprintf(stderr, "Failed to iterate to next entry: %s\n", strerror(-rc));
goto out40;
} else if (rc == 0) {
+ if (verbose > 2)
+ printf("Waiting...\n");
if ((rc = sd_journal_wait(journal, (uint64_t) -1)) < 0) {
fprintf(stderr, "Failed to wait for changes: %s\n", strerror(-rc));
goto out40;
@@ -200,6 +202,9 @@ int main(int argc, char **argv) {
}
summary = g_markup_escape_text(data + 18, length - 18);
+ if (verbose > 2)
+ printf("Received message from journal: %s\n", message);
+
/* show notification */
if (have_regex == 0 || regexec(&regex, message, 0, NULL, 0) == 0) {
for (i = 0; i < 3; i++) {