Skip to content

Commit

Permalink
rsyslog: Keep Linux console log level default
Browse files Browse the repository at this point in the history
MarIuX’ Linux kernel’s default console log level is configured to be 7.

    $ grep LOGLEVEL /boot/config-5.4.21.mx64.323
    CONFIG_CONSOLE_LOGLEVEL_DEFAULT=7
    CONFIG_CONSOLE_LOGLEVEL_QUIET=4
    CONFIG_MESSAGE_LOGLEVEL_DEFAULT=4

Probably to not spam the console, in the distant past rsyslogd was
configured to decrease the log level to 1. After rsyslogd started, the
console log level was therefore changed.

    $ sysctl kernel.printk
    kernel.printk = 1	4	1	7

Especially on the serial console, this is very confusing, as during
start-up suddenly messages are not printed anymore, when messages with
the same log level have been printed before, which happens when rsyslogd
starts.

Remove the kernel log level configuration, so rsyslogd does not change
anything.

If we want to change the default console log level, we should configure
the Linux kernel appropriately. At least in MarIuX, where we build the
Linux kernel ourselves, doing it in rsyslogd is a confusing layering
violation.
pmenzel committed Apr 6, 2020
1 parent 62c917b commit 7192672
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions misc_etc_files/rsyslog.conf
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
$ModLoad imuxsock.so
$ModLoad imklog

$klogConsoleLogLevel 1

*.*;mail.none /var/log/messages
mail.info /var/log/mail.log

0 comments on commit 7192672

Please sign in to comment.