log level everything

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/.

Keith keith at rhizomatica.org
Tue Sep 12 08:55:40 UTC 2017


On 11/09/2017 20:43, Harald Welte wrote:

> Odd. I did not so far observe any broken behavior, 

I don't know if it is "broken" as it's never been clear what
the behaviour is expected to be.

>> Then I get ALL facilities logging at debug.
> You should then get the specific per-subsystem levels you have configured.

Well, I don't.

This may be overkill, but let me go through it step by step
to illustrate my need, experience, expected behaviour,
actual behaviour.

NOTE! I have my libosmocore patch in my original post on
this thread in place, so I can still do log level all
everything.

I'm going to use log facilities MNCC and DCC as connecting
and disconnecting osmo-sip-connector will log messages at
NOTICE on both those facilities.
I'm bringing up a fresh nitb with empty config file and
database. I will use some logging config commands and then
connect and disconnect the MNCC socket.
In this example I would like to silence the CC message from
gsm_04_08.c and only see MNCC messages from mncc_sock.c
>From the transcript below I hope the issue is obvious.


OpenBSC> enable
OpenBSC# logging enable
OpenBSC# logging level mncc fatal
OpenBSC# logging level cc fatal
OpenBSC# logging level all debug
OpenBSC# logging filter all 1
OpenBSC# <0006> mncc_sock.c:271 MNCC Socket has connection
with external call control application
<0006> mncc_sock.c:84 MNCC Socket has LOST connection
<0001> gsm_04_08.c:469 Clearing all currently active
transactions!!!

Here the specific per-subsystem levels were not
respected, rather they were over-ridden by the logging all
directive.

OpenBSC# logging level all everything
OpenBSC# logging level mncc info
OpenBSC# <0006> mncc_sock.c:271 MNCC Socket has connection
with external call control application
<0006> mncc_sock.c:84 MNCC Socket has LOST connection

Now the subsystem levels were respected, as CC was FATAL,
MNCC was INFO
This is my desired behaviour.

OpenBSC# logging level cc info
OpenBSC# logging level mncc fatal    
OpenBSC# <0001> gsm_04_08.c:469 Clearing all currently
active transactions!!!

Reversed. Levels still respected, good.

OpenBSC# logging level all debug
OpenBSC# <0006> mncc_sock.c:271 MNCC Socket has connection
with external call control application
<0006> mncc_sock.c:84 MNCC Socket has LOST connection
<0001> gsm_04_08.c:469 Clearing all currently active
transactions!!!

Again, Now _everything_ is logging at DEBUG

Just to really really drive the point home:

OpenBSC# logging level all notice
OpenBSC# logging level cc fatal
OpenBSC# logging level mncc fatal
OpenBSC# <0006> mncc_sock.c:271 MNCC Socket has connection
with external call control application
<0006> mncc_sock.c:84 MNCC Socket has LOST connection
<0001> gsm_04_08.c:469 Clearing all currently active
transactions!!!

It is impossible to silence a subsystem when logging level
all has been issued.
I am only able to achieve this with logging
level all everything - This is the key to respecting the
per-subsystem levels.

Is it possible that what we need to do here is to continue
to allow "everything" only for subsystem "all"?

It seems odd to me that there is confusion about this as we
should know what the code is doing, right?
For me personally to take this further the next step would
be analysis of the vty code, which I have not looked at all,
and well.. if you guys have doubts about it.. I don't have a
lot of desire to go there and unfortunately there are other
pressing issues I need to work on.
So for now, my workaround is to allow logging level all
everything, as it allows me to get on with what I need to do.

k/






More information about the OpenBSC mailing list