Project

General

Profile

Actions

Feature #5034

open

logging: Enable category name instead of hex val by default

Added by pespin about 3 years ago. Updated almost 3 years ago.

Status:
Stalled
Priority:
Low
Assignee:
Category:
libosmocore
Target version:
-
Start date:
02/18/2021
Due date:
% Done:

90%

Spec Reference:

Description

Discussion started in this patch:
https://gerrit.osmocom.org/c/libosmocore/+/12095

Summary/outcome:

As a reference, I think it makes more sense to change it for all log targets this way:diff --git a/src/logging.c b/src/logging.c
index a40008e9..f878be5a 100644
--- a/src/logging.c
+++ b/src/logging.c
@@ -918,7 +918,8 @@ struct log_target *log_target_create(void)
        target->use_color = 1;
        target->print_timestamp = 0;
        target->print_filename2 = LOG_FILENAME_PATH;
-       target->print_category_hex = true;
+       target->print_category_hex = false;
+       target->print_category = true;

So here actually by default we disable the hex output and we enable the string representation. Once this is applied, some tests will need to be adapted since they may not set those fields explicitly and use default ones.

Steps:
  • Apply change in libosmocore locally
  • Build other projects and see if a test in any projects fails. For each test failing, make sure to set explicit values for log_set_print_category{_hex} to match current expectancies.
  • Once those patches are merged, submit + merge libosmocore patch changing the default.

Related issues

Related to Cellular Network Infrastructure - Bug #6272: default config files have different log format config for stderrResolvedjolly11/24/2023

Actions
Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)