From f2644aee5525a6f889816c3e0d613e3c7145d01d Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Wed, 20 Nov 2019 04:00:29 +0100 Subject: 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 --- tests/logging/logging_test.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/logging/logging_test.c') 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, }, }; -- cgit v1.2.3