log level all is broken
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.
- 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
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: https://firstname.lastname@example.org/msg08795.html
A related set of patches is up on gerrit, after the discussion on openbsc@ has seemingly concluded.