Project

General

Profile

Bug #3409

log level all is broken

Added by pespin about 1 year ago. Updated about 1 year ago.

Status:
Resolved
Priority:
Urgent
Assignee:
Category:
libosmocore
Target version:
-
Start date:
07/20/2018
Due date:
% Done:

100%

Spec Reference:

Description

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

LOGP(DL1P, LOGL_NOTICE, "bla");

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

History

#1 Updated by fixeria about 1 year ago

I would like to confirm that this problem does also affect OsmocomBB/mobile, and
doesn't appear after applying: https://gerrit.osmocom.org/10021/

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

#2 Updated by pespin about 1 year 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: https://gerrit.osmocom.org/#/c/libosmocore/+/10116

#3 Updated by fixeria about 1 year ago

  • Priority changed from Normal to Urgent

#4 Updated by pespin about 1 year 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:
https://gerrit.osmocom.org/#/c/libosmocore/+/10116/
https://gerrit.osmocom.org/#/c/libosmocore/+/10136/

ML thread about this topic: https://www.mail-archive.com/openbsc@lists.osmocom.org/msg08795.html

#5 Updated by pespin about 1 year ago

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

#6 Updated by pespin about 1 year ago

  • Assignee changed from pespin to neels

#8 Updated by neels about 1 year ago

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

#9 Updated by laforge about 1 year ago

neels, what's missing here?

#10 Updated by fixeria about 1 year ago

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

#11 Updated by neels about 1 year 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)