Bug 71546 - journalctl --follow --since will show the head instead of the tail
Summary: journalctl --follow --since will show the head instead of the tail
Status: RESOLVED FIXED
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: All Linux (All)
: medium minor
Assignee: systemd-bugs
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-12 19:00 UTC by ram-z
Modified: 2014-11-27 05:40 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description ram-z 2013-11-12 19:00:35 UTC
$ journalctl --follow --since=-1day
will:
1. show the FIRST 10 lines of `journalctl --since=-1day`
2. wait for new entries 
3. print all the rest when a new entry is added to the journal

It's not really an issue, but kind of unexpected. I only noticed because I have an alias jc='journalctl --since=-1day'
Comment 1 Lennart Poettering 2014-02-21 14:27:32 UTC
Hmm, indeed. This is confusing. Note sure though what the right behaiour would be in this combination... Maybe just print an error?
Comment 2 ram-z 2014-02-21 15:17:22 UTC
IMHO --follow should take precedence over --since because --since will show all entries starting at a specific date up until now, and --follow will print entries from now on.
Throw an error when mixing --follow and --until, since that doesn't make any sense.
Comment 3 Zbigniew Jedrzejewski-Szmek 2014-11-27 05:40:47 UTC
With commit http://cgit.freedesktop.org/systemd/systemd/commit/?id=70af7b8ada --follow with --since first prints all lines that --since would print, and then follows.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.