|
7 | 7 | <title>Environment</title> |
8 | 8 |
|
9 | 9 | <variablelist class='environment-variables'> |
| 10 | + <varlistentry id='log-level'> |
| 11 | + <term><varname>$SYSTEMD_LOG_LEVEL</varname></term> |
| 12 | + |
| 13 | + <listitem><para>The maximum log level of emitted messages (messages with a higher log level, i.e. less |
| 14 | + important ones, will be suppressed). Either one of (in order of decreasing importance) |
| 15 | + <constant>emerg</constant>, <constant>alert</constant>, <constant>crit</constant>, |
| 16 | + <constant>err</constant>, <constant>warning</constant>, <constant>notice</constant>, |
| 17 | + <constant>info</constant>, <constant>debug</constant>, or an integer in the range 0…7. See |
| 18 | + <citerefentry project='man-pages'><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry> |
| 19 | + for more information.</para> |
| 20 | + </listitem> |
| 21 | + </varlistentry> |
| 22 | + |
| 23 | + <varlistentry id='log-color'> |
| 24 | + <term><varname>$SYSTEMD_LOG_COLOR</varname></term> |
| 25 | + |
| 26 | + <listitem><para>A boolean. If true, messages written to the tty will be colored according to |
| 27 | + priority.</para> |
| 28 | + |
| 29 | + <para>This setting is only useful when messages are written directly to the terminal, because |
| 30 | + <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry> and |
| 31 | + other tools that display logs will color messages based on the log level on their own.</para> |
| 32 | + </listitem> |
| 33 | + </varlistentry> |
| 34 | + |
| 35 | + <varlistentry id='log-time'> |
| 36 | + <term><varname>$SYSTEMD_LOG_TIME</varname></term> |
| 37 | + |
| 38 | + <listitem><para>A boolean. If true, log messages will be prefixed with a timestamp.</para> |
| 39 | + |
| 40 | + <para>This setting is only useful when messages are written directly to the terminal or a file, because |
| 41 | + <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry> and |
| 42 | + other tools that display logs will attach timestamps based on the entry metadata on their own.</para> |
| 43 | + </listitem> |
| 44 | + </varlistentry> |
| 45 | + |
| 46 | + <varlistentry id='log-location'> |
| 47 | + <term><varname>$SYSTEMD_LOG_LOCATION</varname></term> |
| 48 | + |
| 49 | + <listitem><para>A boolean. If true, messages will be prefixed with a filename and line number |
| 50 | + in the source code where the message originates.</para> |
| 51 | + |
| 52 | + <para>Note that the log location is often attached as metadata to journal entries anyway. Including it |
| 53 | + directly in the message text can nevertheless be convenient when debugging programs.</para> |
| 54 | + </listitem> |
| 55 | + </varlistentry> |
| 56 | + |
| 57 | + <varlistentry id='log-tid'> |
| 58 | + <term><varname>$SYSTEMD_LOG_TID</varname></term> |
| 59 | + |
| 60 | + <listitem><para>A boolean. If true, messages will be prefixed with the current numerical thread ID |
| 61 | + (TID).</para> |
| 62 | + |
| 63 | + <para>Note that the this information is attached as metadata to journal entries anyway. Including it |
| 64 | + directly in the message text can nevertheless be convenient when debugging programs.</para> |
| 65 | + </listitem> |
| 66 | + </varlistentry> |
| 67 | + |
| 68 | + <varlistentry id='log-target'> |
| 69 | + <term><varname>$SYSTEMD_LOG_TARGET</varname></term> |
| 70 | + |
| 71 | + <listitem><para>The destination for log messages. One of <constant>console</constant> (log to the |
| 72 | + attached tty), <constant>console-prefixed</constant> (log to the attached tty but with prefixes |
| 73 | + encoding the log level and "facility", see <citerefentry |
| 74 | + project='man-pages'><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>, |
| 75 | + <constant>kmsg</constant> (log to the kernel circular log buffer), <constant>journal</constant> (log to |
| 76 | + the journal), <constant>journal-or-kmsg</constant> (log to the journal if available, and to kmsg |
| 77 | + otherwise), <constant>auto</constant> (dermine the appropriate log target automatically, the default), |
| 78 | + <constant>null</constant> (disable log output).</para> |
| 79 | + <!-- <constant>syslog</constant>, <constant>syslog-or-kmsg</constant> are deprecated --> |
| 80 | + </listitem> |
| 81 | + </varlistentry> |
| 82 | + |
10 | 83 | <varlistentry id='pager'> |
11 | 84 | <term><varname>$SYSTEMD_PAGER</varname></term> |
12 | 85 |
|
|
0 commit comments