journalctl: add with-unit mode
When dealing with a large number of template instances, for example when launching daemons per VRF, it is hard for operators to correlate log lines to arguments. Add a new with-unit mode which, if available, prefixes unit and user unit names when displaying its log messages instead of the syslog identifier. It will also use the full timestamp with timezones, like the short-full mode.
This commit is contained in:
committed by
Zbigniew Jędrzejewski-Szmek
parent
c1a1b409ce
commit
49805b3d81
@@ -66,7 +66,7 @@ _journalctl() {
|
||||
compopt -o filenames
|
||||
;;
|
||||
--output|-o)
|
||||
comps='short short-full short-iso short-iso-precise short-precise short-monotonic short-unix verbose export json json-pretty json-sse cat'
|
||||
comps='short short-full short-iso short-iso-precise short-precise short-monotonic short-unix verbose export json json-pretty json-sse cat with-unit'
|
||||
;;
|
||||
--field|-F)
|
||||
comps=$(journalctl --fields | sort 2>/dev/null)
|
||||
|
||||
Reference in New Issue
Block a user