journalctl: add new output mode "short-full" (#3880)

This new output mode formats all timestamps using the usual format_timestamp()
call we use pretty much everywhere else. Timestamps formatted this way are some
ways more useful than traditional syslog timestamps as they include weekday,
month and timezone information, while not being much longer. They are also not
locale-dependent. The primary advantage however is that they may be passed
directly to journalctl's --since= and --until= switches as soon as #3869 is
merged.

While we are at it, let's also add "short-unix" to shell completion.
This commit is contained in:
Lennart Poettering
2016-08-03 19:45:07 -04:00
committed by Zbigniew Jędrzejewski-Szmek
parent 21b3a0fcd1
commit 29a753df76
7 changed files with 140 additions and 92 deletions
+1 -1
View File
@@ -65,7 +65,7 @@ _journalctl() {
compopt -o filenames
;;
--output|-o)
comps='short short-iso short-precise short-monotonic verbose export json json-pretty json-sse cat'
comps='short short-full short-iso short-precise short-monotonic short-unix verbose export json json-pretty json-sse cat'
;;
--field|-F)
comps=$(journalctl --fields | sort 2>/dev/null)
+1 -1
View File
@@ -145,7 +145,7 @@ _systemctl () {
comps='full enable-only disable-only'
;;
--output|-o)
comps='short short-iso short-precise short-monotonic verbose export json
comps='short short-full short-iso short-precise short-monotonic short-unix verbose export json
json-pretty json-sse cat'
;;
--machine|-M)