document usage with systemd-journald (#61)

Closes #61.
This commit is contained in:
Adam Spiers 2017-04-19 12:19:47 +01:00
parent 96714db6e5
commit 23b3d195ba

View File

@ -72,6 +72,27 @@ You can view all the syslog messages by running:
$ lnav /var/log/messages*
Usage with `systemd-journald`
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
On systems running `systemd-journald`, you can use `lnav` as the pager:
$ journalctl | lnav
or in follow mode:
$ journalctl -f | lnav
Since `journalctl`'s default output format omits the year, if you are
viewing logs which span multiple years you will need to change the
output format to include the year, otherwise `lnav` gets confused:
$ journalctl -o short-iso | lnav
If your system has been running for a long time, for increased
efficiency you may want to limit the number of log lines fed into
`lnav`, e.g. via `journalctl`'s `-n` or `--since=...` options.
Screenshot
----------