Project

General

Profile

Actions

Bug #3409

closed

log level all is broken

Added by pespin over 5 years ago. Updated over 5 years 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 brokenResolvedneels

Actions
Actions #1

Updated by fixeria over 5 years 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...

Actions #2

Updated by pespin over 5 years 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

Actions #3

Updated by fixeria over 5 years ago

  • Priority changed from Normal to Urgent
Actions #4

Updated by pespin over 5 years 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

Actions #5

Updated by pespin over 5 years ago

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

Updated by pespin over 5 years ago

  • Assignee changed from pespin to neels
Actions #8

Updated by neels over 5 years ago

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

Updated by laforge over 5 years ago

neels, what's missing here?

Actions #10

Updated by fixeria over 5 years ago

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

Actions #11

Updated by neels over 5 years 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 :/

Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)