Bug #3409
closedlog level all is broken
100%
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
Updated by fixeria almost 6 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...
Updated by pespin almost 6 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
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
Updated by pespin over 5 years ago
- Related to Bug #71: Log target of everything is broken added
Updated by neels over 5 years ago
A related set of patches is up on gerrit, after the discussion on openbsc@ has seemingly concluded.
http://lists.osmocom.org/pipermail/openbsc/2018-September/012178.html
https://gerrit.osmocom.org/10883
https://gerrit.osmocom.org/10884
https://gerrit.osmocom.org/10885
https://gerrit.osmocom.org/10886
https://gerrit.osmocom.org/10887
https://gerrit.osmocom.org/10888
https://gerrit.osmocom.org/10889
https://gerrit.osmocom.org/10890
Updated by neels over 5 years ago
- Status changed from Feedback to In Progress
- % Done changed from 0 to 90
Updated by fixeria over 5 years ago
I am happy to confirm that I am not experiencing any problems with logging anymore :P
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 :/