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
Wed Jul 25 16:12:59 UTC 2018


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.

> C) D) T) E)
> I fins all this "temporary" stuff something really not there in current
> code, too complex and not really required.

We actually supported temporary logging increase, even though I never grokked
how it was supposed to work, hence I broke it by removing the logging level all
everything.

This is an attempt to bring it back in an obvious and finely tunable way. It is
not really complex, is it!?

> Current proposed system is basically (and very similar to old system, just a
> bit better sort out imho):

A problem there is that it is changing the meaning of a logging command that
has been there for a decade. Because I fail to understand why exactly it isn't
doing what I want and why it was implemented this way, and because I accept
that other users might rely on exactly the current behavior to do what they
want, I would prefer keeping it unchanged and to add new command names that
make proper sense to us (to not repeat my past mistake).

> You can do whatever config setup you want with following command:
> logging level (all|default|<category>) (unset|<loglevel>)

no, can't do whatever config setup:

> * You have a logtarget loglevel. Each logtarget instance (VTY, stderr,
> gsmtap, etc.) has one. This is also called the "default" log level.
> * Each category can be either set with a loglevel or unset.

This does not allow for the 'logging level all everything' use case:

- I have setup a detailed logging landscape, i.e. not one default level for all
  categories, but a fine grained selection: some on error, some on notice, some
  on info, ...
- Now for a minute I want to quickly see all debug logging.
  logging increase debug all
- Later I want to go back to the detailed landscape.
  logging reset all

I'd like to provide a way to define a fine grained selection of logging levels
as the default, more than just one level across the board. IIUC that can't be
done with the current 'default' and 'unset'?

Besides it changing an old vty command and it still missing an important use
case, I totally agree that your patch is a usability improvement :)

~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/20180725/e6fdb1a9/attachment.bin>


More information about the OpenBSC mailing list