Actions
Feature #5829
openlog fallback for log_check_level(), log_parse_category()
Status:
New
Priority:
Low
Assignee:
-
Category:
-
Target version:
-
Start date:
12/13/2022
Due date:
% Done:
0%
Spec Reference:
Description
in LOGPSRCC and LOGPC macros, we call log_stub() as callback when logging is not enabled.
Every so often, callers use log_check_level() to skip running expensive logging code if no target will print it.
For log_check_level() and log_parse_category(), we still call assert_loginfo(func) unconditionally.
For example osmo_pfcp_msg_err_cb() in libosmo-pfcp/src/libosmo-pfcp/pfcp_msg.c uses log_check_level(),
hence libosmo-pfcp regression tests need to initialize logging or get a program abort without much information.
To make the fallback logging more universally applicable,
log_check_level() could always return true when logging is not initialized;
log_parse_category() could always return DLGLOBAL.
No data to display
Actions