]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
man: reuse common-variables in systemd(1)
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 28 Feb 2021 12:41:58 +0000 (13:41 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 1 Mar 2021 12:40:52 +0000 (13:40 +0100)
This requires a bit of gimnastics, but I think it's still better than
status quo ante, and better than duplicating the text.

man/common-variables.xml
man/systemd.xml

index b875e38d394eb2034976bd5e1abef2b1f46e877c..7798d977146a2e480c1014820c32c804ba585ff2 100644 (file)
@@ -10,9 +10,9 @@
     <varlistentry id='log-level'>
       <term><varname>$SYSTEMD_LOG_LEVEL</varname></term>
 
-      <listitem><para>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)
-      <constant>emerg</constant>, <constant>alert</constant>, <constant>crit</constant>,
+      <listitem><para id='log-level-body'>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) <constant>emerg</constant>, <constant>alert</constant>, <constant>crit</constant>,
       <constant>err</constant>, <constant>warning</constant>, <constant>notice</constant>,
       <constant>info</constant>, <constant>debug</constant>, or an integer in the range 0…7. See
       <citerefentry project='man-pages'><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>
@@ -23,8 +23,8 @@
     <varlistentry id='log-color'>
       <term><varname>$SYSTEMD_LOG_COLOR</varname></term>
 
-      <listitem><para>A boolean. If true, messages written to the tty will be colored according to
-      priority.</para>
+      <listitem><para id='log-color-body'>A boolean. If true, messages written to the tty will be colored
+      according to priority.</para>
 
       <para>This setting is only useful when messages are written directly to the terminal, because
       <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry> and
@@ -35,7 +35,8 @@
     <varlistentry id='log-time'>
       <term><varname>$SYSTEMD_LOG_TIME</varname></term>
 
-      <listitem><para>A boolean. If true, log messages will be prefixed with a timestamp.</para>
+      <listitem><para id='log-time-body'>A boolean. If true, log messages will be prefixed with a
+      timestamp.</para>
 
       <para>This setting is only useful when messages are written directly to the terminal or a file, because
       <citerefentry><refentrytitle>journalctl</refentrytitle><manvolnum>1</manvolnum></citerefentry> and
@@ -46,8 +47,8 @@
     <varlistentry id='log-location'>
       <term><varname>$SYSTEMD_LOG_LOCATION</varname></term>
 
-      <listitem><para>A boolean. If true, messages will be prefixed with a filename and line number
-      in the source code where the message originates.</para>
+      <listitem><para id='log-location-body'>A boolean. If true, messages will be prefixed with a filename
+      and line number in the source code where the message originates.</para>
 
       <para>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.</para>
@@ -57,8 +58,8 @@
     <varlistentry id='log-tid'>
       <term><varname>$SYSTEMD_LOG_TID</varname></term>
 
-      <listitem><para>A boolean. If true, messages will be prefixed with the current numerical thread ID
-      (TID).</para>
+      <listitem><para id='log-tid-body'>A boolean. If true, messages will be prefixed with the current
+      numerical thread ID (TID).</para>
 
       <para>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.</para>
@@ -68,9 +69,9 @@
     <varlistentry id='log-target'>
       <term><varname>$SYSTEMD_LOG_TARGET</varname></term>
 
-      <listitem><para>The destination for log messages. One of <constant>console</constant> (log to the
-      attached tty), <constant>console-prefixed</constant> (log to the attached tty but with prefixes
-      encoding the log level and "facility", see <citerefentry
+      <listitem><para id='log-target-body'>The destination for log messages. One of
+      <constant>console</constant> (log to the attached tty), <constant>console-prefixed</constant> (log to
+      the attached tty but with prefixes encoding the log level and "facility", see <citerefentry
       project='man-pages'><refentrytitle>syslog</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
       <constant>kmsg</constant> (log to the kernel circular log buffer), <constant>journal</constant> (log to
       the journal), <constant>journal-or-kmsg</constant> (log to the journal if available, and to kmsg
index b0b6c7236e2a98f44b4f3d515696748659dd0b00..504c82b25eedcb6249487ba553b6bc1c879ab983 100644 (file)
 
     <variablelist class='environment-variables'>
       <varlistentry>
-        <term><varname>$SYSTEMD_LOG_COLOR</varname></term>
-        <listitem><para>Controls whether systemd highlights important log messages. This can be overridden
-        with <option>--log-color=</option>.</para></listitem>
+        <term><varname>$SYSTEMD_LOG_LEVEL</varname></term>
+        <listitem><xi:include href="common-variables.xml" xpointer="log-level-body" />
+
+        <para>This can be overridden with <option>--log-level=</option>.</para></listitem>
       </varlistentry>
 
       <varlistentry>
-        <term><varname>$SYSTEMD_LOG_LEVEL</varname></term>
-        <listitem><para>systemd reads the log level from this environment variable. This can be overridden
-        with <option>--log-level=</option>.</para></listitem>
+        <term><varname>$SYSTEMD_LOG_COLOR</varname></term>
+        <listitem><xi:include href="common-variables.xml" xpointer="log-color-body" />
+
+        <para>This can be overridden with <option>--log-color=</option>.</para></listitem>
       </varlistentry>
 
       <varlistentry>
-        <term><varname>$SYSTEMD_LOG_LOCATION</varname></term>
-        <listitem><para>Controls whether systemd prints the code location along with log messages. This can
-        be overridden with <option>--log-location=</option>.</para></listitem>
+        <term><varname>$SYSTEMD_LOG_TIME</varname></term>
+        <listitem><xi:include href="common-variables.xml" xpointer="log-time-body" />
+
+        <para>This can be overridden with <option>--log-time=</option>.</para></listitem>
       </varlistentry>
 
       <varlistentry>
-        <term><varname>$SYSTEMD_LOG_TARGET</varname></term>
-        <listitem><para>systemd reads the log target from this environment variable. This can be overridden
-        with <option>--log-target=</option>.</para></listitem>
+        <term><varname>$SYSTEMD_LOG_LOCATION</varname></term>
+        <listitem><xi:include href="common-variables.xml" xpointer="log-location-body" />
+
+        <para>This can be overridden with <option>--log-location=</option>.</para></listitem>
       </varlistentry>
 
       <varlistentry>
-        <term><varname>$SYSTEMD_LOG_TIME</varname></term>
-        <listitem><para>Controls whether systemd prefixes log messages with the current time. This can be
-        overridden with <option>--log-time=</option>.</para></listitem>
+        <term><varname>$SYSTEMD_LOG_TID</varname></term>
+        <listitem><xi:include href="common-variables.xml" xpointer="log-tid-body" /></listitem>
       </varlistentry>
 
       <varlistentry>
-        <term><varname>$SYSTEMD_LOG_TID</varname></term>
-        <listitem><para>Controls whether systemd prefixes log messages with the current thread ID
-        (TID).</para></listitem>
+        <term><varname>$SYSTEMD_LOG_TARGET</varname></term>
+        <listitem><xi:include href="common-variables.xml" xpointer="log-target-body" />
+
+        <para>This can be overridden with <option>--log-target=</option>.</para></listitem>
       </varlistentry>
 
       <varlistentry>