Bug #3409

log level all is broken

Added by pespin 9 months ago. Updated 7 months ago.

Target version:
Start date:
Due date:
% Done:


Spec Reference:


I add the following LOG line to osmo-bts-trx:


If I use the following cfg file, the line doesn't show up:

log stderr
 logging filter all 1
 logging level all error
 logging level l1p notice
 logging level l1c error
 logging level trx error

However, if I change the log line in the code to be LOGL_ERROR, then it shows up.

So, in my opinion, parsing of commands should set the levels in the following way:
- First "logging level all error" is read, so all log categories are set to ERROR.
- Then "logging level l1p notice" is read, so this specific category level is overwritten and set to NOTICE.
- As a result, all log lines of L1P category with level NOTICE or ERROR are printed. Additionally, ERROR level for all categories is also printed.

Related issues

Related to libosmocore - Bug #71: Log target of everything is brokenResolved


#1 Updated by fixeria 9 months ago

I would like to confirm that this problem does also affect OsmocomBB/mobile, and
doesn't appear after applying:

The root of this issue still remains unknown...
I hope this would help to narrow the scope...

#2 Updated by pespin 9 months ago

  • Category set to libosmocore
  • Status changed from New to Feedback
  • Assignee set to pespin

osmo-bts is already using osmo_logging_init2. Looking at the code of logging.c I think the logic is completely messed up. I created a patch to make the logic more expected and useful:

#3 Updated by fixeria 9 months ago

  • Priority changed from Normal to Urgent

#4 Updated by pespin 8 months ago

There's two patches I submitted providing fixes for this. I modified them after some discussions with fixera, and I imho they are good enough for merge. They are currently under discussion and blocked:

ML thread about this topic:

#5 Updated by pespin 8 months ago

  • Related to Bug #71: Log target of everything is broken added

#6 Updated by pespin 8 months ago

  • Assignee changed from pespin to neels

#8 Updated by neels 8 months ago

  • Status changed from Feedback to In Progress
  • % Done changed from 0 to 90

#9 Updated by laforge 7 months ago

neels, what's missing here?

#10 Updated by fixeria 7 months ago

I am happy to confirm that I am not experiencing any problems with logging anymore :P

#11 Updated by neels 7 months ago

  • Status changed from In Progress to Resolved
  • % Done changed from 90 to 100

missing: me resolving the issue. sorry about that, looks like I skipped a few issues sweep mondays :/

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)