The magic behaviour of 'logging level all LEVEL'

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Neels Hofmeyr nhofmeyr at sysmocom.de
Thu Jul 26 14:20:40 UTC 2018


On Thu, Jul 26, 2018 at 11:04:25AM +0200, Pau Espin Pedrol wrote:
> 
> 
> On 25/07/18 18:12, Neels Hofmeyr wrote:
> > On Wed, Jul 25, 2018 at 05:31:59PM +0200, Pau Espin Pedrol wrote:
> > > A) It's already there as it is now, no need to change. When you start a
> > > program, code harcoded categories are set with a given loglevel.
> > 
> > But currently no way to get back to it, IIUC. Not important anyway.
> 
> No, we cannot, we would probably require a new API to store them as
> "harcoded categories"

The information is always there, the default categories log_info_cat struct are
const. Remeber, each log target has its own category-level settings, so
obviously the hardcoded defaults remain available. It's a simple thing.

And still not really important :)

> Same as my last above comment. My intention with this patchset was to have
> the logging working again trying not to touch that much, and avoid spending
> much time on it. If at some point we supported the feature, it's not the
> case anymore nowadays. If somebody wants to re-add that feature and change
> the logging system, patches welcome.

And same as my last comment, you are changing a decade old vty command.
Last time I did this it was the wrong choice.

> Someone can always add these feature on top of present patchset if there's
> enough use for it.

Introducing a common default level actually also closes the door on
fine-grained default levels. I mean the VTY UI you are introducing would have
to be deprecated to introduce fine-grained defaults.

It is actually not practical to have all categories on the same level, unless
it is, say, ERROR.

So the patch does what you want and is better than current 'logging level all
xxx' indeed, but changes old UI and has limits. As much as I'd like to let it
go ahead, I'm still -1, sorry.

> 1- Open a new VTY, then call logging level all debug

true. Any opinions on this one, Keith maybe?

> 2- Write down the commands you used to set the logging, then paste them
> after running "logging level default debug; logging level all unset" to see
> all logging for a while.

I had the same idea once, but it's not practical. Copy pasting and stuff is not
something we want to require the user to do.

~N
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.osmocom.org/pipermail/openbsc/attachments/20180726/792254c8/attachment.bin>


More information about the OpenBSC mailing list