diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2019-11-20 04:00:29 +0100 |
---|---|---|
committer | laforge <laforge@osmocom.org> | 2019-11-23 07:58:47 +0000 |
commit | f2644aee5525a6f889816c3e0d613e3c7145d01d (patch) | |
tree | d940f9955612690ad3be2e805d5b8ddf08b45223 /tests/logging | |
parent | a981f9dfd4e9305b627e552aeecdabe8a4ca486a (diff) |
logging.h: define ansi color constants
It's hard to figure out what color logging categories have with those ANSI
color code strings. Instead, define these OSMO_LOGCOLOR_* constants.
Naming: commonly, the logging.h header has the "LOG" prefix in the name, but it
seems saner to include the OSMO_ prefix: it seems too likely that some
libosmocore user somewhere already has defined "LOGCOLOR_RED" somewhere.
Change-Id: I03b6b1f73ae7ee61d37ff921e071a3d0881d3e9a
Diffstat (limited to 'tests/logging')
-rw-r--r-- | tests/logging/logging_test.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/logging/logging_test.c b/tests/logging/logging_test.c index 8fd71d0c..b9cb57fb 100644 --- a/tests/logging/logging_test.c +++ b/tests/logging/logging_test.c @@ -37,19 +37,19 @@ static const struct log_info_cat default_categories[] = { [DRLL] = { .name = "DRLL", .description = "A-bis Radio Link Layer (RLL)", - .color = "\033[1;31m", + .color = OSMO_LOGCOLOR_RED, .enabled = 1, .loglevel = LOGL_NOTICE, }, [DCC] = { .name = "DCC", .description = "Layer3 Call Control (CC)", - .color = "\033[1;32m", + .color = OSMO_LOGCOLOR_GREEN, .enabled = 1, .loglevel = LOGL_NOTICE, }, [DMM] = { .name = NULL, .description = "Layer3 Mobility Management (MM)", - .color = "\033[1;33m", + .color = OSMO_LOGCOLOR_YELLOW, .enabled = 1, .loglevel = LOGL_NOTICE, }, }; |