chiark / gitweb /
core: read "debug" from kernel commandline and set log level
authorLukas Nykryn <lnykryn@redhat.com>
Wed, 29 May 2013 12:09:56 +0000 (14:09 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 30 May 2013 04:43:39 +0000 (00:43 -0400)
TODO
man/kernel-command-line.xml
man/systemd.xml
src/core/main.c

diff --git a/TODO b/TODO
index f8a1b1b5787edddab03f0cd8f13b00ff2c028ae3..7883b7e33a4051e45ac70055ca43b9f7e4a5a122 100644 (file)
--- a/TODO
+++ b/TODO
@@ -56,9 +56,6 @@ Features:
   complain loudly if they have argv[0][0] == '@' set.
   https://bugzilla.redhat.com/show_bug.cgi?id=961044
 
-* read the kernel's console "debug" keyword like we read "quiet" and adjust:
-    systemd.log_level=debug and maybe systemd.log_target=kmsg
-
 * add an option to nspawn that uses seccomp to make socket(AF_NETLINK,
   SOCK_RAW, NETLINK_AUDIT) fail the the appropriate error code that
   makes the audit userspace to think auditing is not available in the
index 7ff2709fbd88dd4fafd8d3c58f486bffdb673740..db5d38a741519b560ef33e0d28f1637b5f51903a 100644 (file)
                                 </listitem>
                         </varlistentry>
 
+                        <varlistentry>
+                                <term><varname>debug</varname></term>
+                                <listitem>
+                                        <para>Parameter understood by
+                                        both the kernel and the system
+                                        and service manager to control
+                                        console log verbosity. For
+                                        details see
+                                        <citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry>.</para>
+                                </listitem>
+                        </varlistentry>
+
                         <varlistentry>
                                 <term><varname>emergency</varname></term>
                                 <term><varname>single</varname></term>
index d009ed8e1c567d9676d5263762d062e78cf5f7c8..497dd2bfeeb635a78ab8f835fff303ce7922bab4 100644 (file)
                         <varlistentry>
                                 <term><varname>quiet</varname></term>
 
-                                <listitem><para>If passed turns off
+                                <listitem><para>Turn off
                                 status output at boot, much like
                                 <varname>systemd.show_status=false</varname>
                                 would. Note that this option is also
                                 read by the kernel itself and disables
-                                kernel log output to the
-                                kernel. Passing this option hence
-                                turns off the usual output from both
-                                the system manager and the
+                                kernel log output. Passing this option
+                                hence turns off the usual output from
+                                both the system manager and the kernel.
+                                </para></listitem>
+                        </varlistentry>
+
+                        <varlistentry>
+                                <term><varname>debug</varname></term>
+
+                                <listitem><para>Turn on debugging
+                                output. This is equivalent to
+                                <varname>systemd.log_level=debug</varname>.
+                                Note that this option is also read by
+                                the kernel itself and enables kernel
+                                debug output.  Passing this option
+                                hence turns on the debug output from
+                                both the system manager and the
                                 kernel.</para></listitem>
                         </varlistentry>
 
index bf1e3e8ffae19f8618adc740cc365ec1dab813bf..bb7364054e3942224f1424720be3231a33de91b7 100644 (file)
@@ -410,6 +410,8 @@ static int parse_proc_cmdline_word(const char *word) {
 
         } else if (streq(word, "quiet"))
                 arg_show_status = false;
+        else if (streq(word, "debug"))
+                log_set_max_level(LOG_DEBUG);
         else if (!in_initrd()) {
                 unsigned i;