From 5bd27a17ca1e8b5f51fa43d61816de62337ef6b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Sun, 28 Feb 2021 13:22:06 +0100 Subject: [PATCH] man: describe various logging configuration variables Fixes #17484. This patch affects systemctl(1), as well as all man pages that include all of common-variables.xml, i.e. most of our command line tools. --- man/common-variables.xml | 73 ++++++++++++++++++++++++++++++++++++++++ man/systemctl.xml | 5 +++ 2 files changed, 78 insertions(+) diff --git a/man/common-variables.xml b/man/common-variables.xml index 809a9084a21..b875e38d394 100644 --- a/man/common-variables.xml +++ b/man/common-variables.xml @@ -7,6 +7,79 @@ Environment + + $SYSTEMD_LOG_LEVEL + + The maximum log level of emitted messages (messages with a higher log level, i.e. less + important ones, will be suppressed). Either one of (in order of decreasing importance) + emerg, alert, crit, + err, warning, notice, + info, debug, or an integer in the range 0…7. See + syslog3 + for more information. + + + + + $SYSTEMD_LOG_COLOR + + A boolean. If true, messages written to the tty will be colored according to + priority. + + This setting is only useful when messages are written directly to the terminal, because + journalctl1 and + other tools that display logs will color messages based on the log level on their own. + + + + + $SYSTEMD_LOG_TIME + + A boolean. If true, log messages will be prefixed with a timestamp. + + This setting is only useful when messages are written directly to the terminal or a file, because + journalctl1 and + other tools that display logs will attach timestamps based on the entry metadata on their own. + + + + + $SYSTEMD_LOG_LOCATION + + A boolean. If true, messages will be prefixed with a filename and line number + in the source code where the message originates. + + Note that the log location is often attached as metadata to journal entries anyway. Including it + directly in the message text can nevertheless be convenient when debugging programs. + + + + + $SYSTEMD_LOG_TID + + A boolean. If true, messages will be prefixed with the current numerical thread ID + (TID). + + Note that the this information is attached as metadata to journal entries anyway. Including it + directly in the message text can nevertheless be convenient when debugging programs. + + + + + $SYSTEMD_LOG_TARGET + + The destination for log messages. One of console (log to the + attached tty), console-prefixed (log to the attached tty but with prefixes + encoding the log level and "facility", see syslog3, + kmsg (log to the kernel circular log buffer), journal (log to + the journal), journal-or-kmsg (log to the journal if available, and to kmsg + otherwise), auto (dermine the appropriate log target automatically, the default), + null (disable log output). + + + + $SYSTEMD_PAGER diff --git a/man/systemctl.xml b/man/systemctl.xml index 62bc7fe832b..8402b9508a0 100644 --- a/man/systemctl.xml +++ b/man/systemctl.xml @@ -2407,6 +2407,11 @@ Jan 12 10:46:45 example.com bluetoothd[8900]: gatt-time-server: Input/output err + + + + +