From 96714db6e5fba2c88c3ec517fdfd24c85fd1308d Mon Sep 17 00:00:00 2001 From: Adam Spiers Date: Wed, 19 Apr 2017 11:36:22 +0100 Subject: [PATCH 1/2] README.md: cosmetic tweaks --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 9a9ebe66..03776b13 100644 --- a/README.md +++ b/README.md @@ -42,7 +42,7 @@ Lnav follows the usual GNU style for configuring and installing software: $ make $ sudo make install -__Run ```./autogen.sh``` before running any of the above commands when +__Run `./autogen.sh` before running any of the above commands when compiling from a cloned repository.__ @@ -55,15 +55,15 @@ Alternatively, you can get the generated binary from [AppVeyor](https://ci.appve Remember that you still need the lnav dependencies under Cygwin, here is a quick way to do it: -`setup-x86_64.exe -q -P libpcre1 -P libpcrecpp0 -P libsqlite3_0 -P libstdc++6` + setup-x86_64.exe -q -P libpcre1 -P libpcrecpp0 -P libsqlite3_0 -P libstdc++6 Currently, the x64 version seems to be working better than the x86 one. -Using +Usage ----- -The only file installed is the executable, "lnav". You can execute it +The only file installed is the executable, `lnav`. You can execute it with no arguments to view the default set of files: $ lnav @@ -81,6 +81,7 @@ highlights. Errors are red and warnings are yellow. [![Screenshot](http://tstack.github.io/lnav/lnav-syslog-thumb.png)](http://tstack.github.io/lnav/lnav-syslog.png) + See Also -------- From 23b3d195ba6e6083624b983fb54566c6b7c43d82 Mon Sep 17 00:00:00 2001 From: Adam Spiers Date: Wed, 19 Apr 2017 12:19:47 +0100 Subject: [PATCH 2/2] document usage with systemd-journald (#61) Closes #61. --- README.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/README.md b/README.md index 03776b13..c4406365 100644 --- a/README.md +++ b/README.md @@ -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 ----------