Re: [PATCH] printk: Add loglevel for "do not print to consoles".
From: Tetsuo Handa
Date: Wed May 13 2020 - 10:04:05 EST
On 2020/05/13 22:46, Steven Rostedt wrote:
> On Wed, 13 May 2020 20:03:53 +0900
> Tetsuo Handa <penguin-kernel@xxxxxxxxxxxxxxxxxxx> wrote:
>
>> I think that basically only oops (e.g. WARN()/BUG()/panic()) messages worth
>> printing to consoles and the rest messages do not worth printing to consoles.
>> Existing KERN_$LOGLEVEL is too rough-grained.
>
> And this statement is exactly why I believe you are wrong.
>
> Because *I* think messages to the console is more important than messages
> to the logs. Several of my servers are only monitored by the console. I
> seldom look at the logs on those machines.
As a technical staff at a support center, I can never monitor the consoles of
customer's servers. I can examine only syslog messages saved as /var/log/messages .
>
> This is a policy decision, and must be made by user space. Your use case is
> not applicable to everyone else's use case. And should not be set in stone
> by the kernel.
My proposal does not set in stone by the kernel.
My proposal is gives users a chance to control whether to print to consoles.
On 2020/05/13 22:55, Steven Rostedt wrote:
> On Wed, 13 May 2020 20:03:53 +0900
> Tetsuo Handa <penguin-kernel@xxxxxxxxxxxxxxxxxxx> wrote:
>
>> I think that basically only oops (e.g. WARN()/BUG()/panic()) messages worth
>> printing to consoles and the rest messages do not worth printing to consoles.
>> Existing KERN_$LOGLEVEL is too rough-grained.
>
> Why don't you look into having a "noconsole" command line option that will
> not print anything to the consoles but oops messages.
I can't force customers to use "noconsole" command line option. That's a
too rough-grained boolean.
>
> Sounds more like what you would like, and something that perhaps would be
> acceptable by the larger community.