With a bit of time passed, I am revisiting this.
It seems that my plan to have a per-subsystem configurable default log level as
well as a per-subsystem configurable elevated/silenced log level is pretty much
off the table.
So then, for me that means it opens the door to accept Pau's patch.
There was other criticism though:
You certainly don't want to set DEBUG on all
categories, as otherwise you're
going to be spammed and will drown in too much information.
For some programs (osmo-hlr, osmo-msc, osmo-bsc) it does actually make perfect
sense to set everything to DEBUG in a lab environment. That's why the
brokenness of 'logging level all debug' is so annoying. You think you've set
each and every log level to debug, but for some obscure reason still some
logging is missing.
Similarly, if I want to silence all logging except ERRORs, 'logging level all
error' is a very useful command -- if it works the way that it sounds.
"Do we really have no more pressing needs than
re-desinging/defining how the
log configuration works?"
Above annoyance is recurring and hindering everything else by constant
uncertainty of what is being logged and/or the need to consider each individual
logging category all the time.
while
'logging level default LEVEL'
would only affect the default logging level...
What is the "default logging level" ? The level compiled-into the struct
log_info?
The "default" would be a single global setting for all categories. I sense a
conflict between the "default" level and the struct log_info compiled-in
defaults. Would the "default" level override the compiled-in defaults? Would
the "default" have no effect until the vty command is issued? Or would the
"default" have no effect until we call 'unset-all' to "unset"
the initial
levels copied from struct log_info levels?
Now that I've accepted that we will not have a per-category adjustable default
level, I think we might as well just stay with the compiled-in log_info
defaults, and not introduce another default level.
I want to be able to change all categories' current levels to "DEBUG" or
"ERROR" with a single command, but I don't really have a need for a common
default to fall back to. (Instead I would again set 'all' to that level.)
So I've swerved 180° and now think that even the proposed one common default
level across all categories is more complexity than we need.
Can we fix 'logging level all foo' separately, without introducing more
defaults first? We can then still consider the default,unset feature on its
own.
~N