Bug#766598: systemd: help for journalctl --until option is misleading

Santiago Vila sanvila at unex.es
Fri Oct 24 10:46:04 BST 2014


Package: systemd
Version: 215-5+b1
Tags: patch

The output of journalctl --help says this:

 --since=DATE          Start showing entries on or newer than the specified date
 --until=DATE          Stop showing entries on or older than the specified date

This is a little bit confusing. In fact, because of the "on or older"
part I believed that the meaning of --until was like this:

 --until=DATE          Only show entries on or older than the specified date

However, I have verified that the real meaning, which fortunately
matches the current behaviour, is this one:

 --until=DATE          Only show entries *older* than the specified date

I say "fortunately" because this is the behaviour that will allow a
tool like logcheck to track easily the logs that have been checked and
the ones that have not (because the "since" is inclusive and the
"until" is exclusive, much like python's range)

Therefore, if the phrase for the --until option starts with the word "Stop",
then it should be like this:

 --until=DATE          Stop showing entries on or *newer* than the specified date

Patch follows:

diff --git a/src/journal/journalctl.c b/src/journal/journalctl.c
index 86453e6..a1bb466 100644
--- a/src/journal/journalctl.c
+++ b/src/journal/journalctl.c
@@ -171,7 +171,7 @@ static int help(void) {
                "     --user                Show only the user journal for the current user\n"
                "  -M --machine=CONTAINER   Operate on local container\n"
                "     --since=DATE          Start showing entries on or newer than the specified date\n"
-               "     --until=DATE          Stop showing entries on or older than the specified date\n"
+               "     --until=DATE          Stop showing entries on or newer than the specified date\n"
                "  -c --cursor=CURSOR       Start showing entries from the specified cursor\n"
                "     --after-cursor=CURSOR Start showing entries from after the specified cursor\n"
                "     --show-cursor         Print the cursor after all the entries\n"

Thanks a lot.



More information about the Pkg-systemd-maintainers mailing list