Add new --level-prefix option
This prepends a severity level such as <3> to each line of diagnostic output, with numeric severity levels taken from matching syslog(3) (such as LOG_ERR = 3), so that the diagnostic output can be parsed by tools like `logger --prio-prefix` and `systemd-cat --level-prefix=1` that support that encoding. The facility (LOG_USER, etc.) is not included, since it makes little sense to vary on a per-message basis. logger(1) supports prefixes with or without a facility, and systemd-cat(1) only supports prefixes without a facility, so this is compatible with both. A future version of Steam's pressure-vessel is likely to use this to make warnings and fatal errors from bubblewrap more visible. Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
Reference in New Issue
Block a user