logging: add a new category DLCSN1 for libosmo-csn1

This new category is going to be used by CSN.1 codec in libosmo-csn1.

Change-Id: Ie8c0effb764547a0f9cc8c6825e11a6617501e95
This commit is contained in:
Vadim Yanitskiy 2022-08-03 05:35:04 +07:00
parent b3e3a5d215
commit 8137d9a0f0
3 changed files with 11 additions and 3 deletions

View File

@ -151,7 +151,8 @@ void logp(int subsys, const char *file, int line, int cont, const char *format,
#define DLNSSIGNAL -23 /*!< Osmocom NS layer signal pdus */
#define DLIUUP -24 /*!< Osmocom IuUP layer */
#define DLPFCP -25 /*!< Osmocom Packet Forwarding Control Protocol */
#define OSMO_NUM_DLIB 25 /*!< Number of logging sub-systems in libraries */
#define DLCSN1 -26 /*!< CSN.1 (Concrete Syntax Notation 1) codec */
#define OSMO_NUM_DLIB 26 /*!< Number of logging sub-systems in libraries */
/* Colors that can be used in log_info_cat.color */
#define OSMO_LOGCOLOR_NORMAL NULL

View File

@ -307,6 +307,12 @@ static const struct log_info_cat internal_cat[OSMO_NUM_DLIB] = {
.enabled = 1, .loglevel = LOGL_NOTICE,
.color = "\033[38;5;51m",
},
[INT2IDX(DLCSN1)] = {
.name = "DLCSN1",
.description = "libosmo-csn1 Concrete Syntax Notation 1 codec",
.enabled = 1, .loglevel = LOGL_NOTICE,
.color = "\033[38;5;11m",
},
};
void assert_loginfo(const char *src)

View File

@ -54,7 +54,7 @@ logging_vty_test# list
logging print level (0|1)
logging print file (0|1|basename) [last]
logging set-log-mask MASK
logging level (aa|bb|ccc|dddd|eee|lglobal|llapd|linp|lmux|lmi|lmib|lsms|lctrl|lgtp|lstats|lgsup|loap|lss7|lsccp|lsua|lm3ua|lmgcp|ljibuf|lrspro|lns|lbssgp|lnsdata|lnssignal|liuup|lpfcp) (debug|info|notice|error|fatal)
logging level (aa|bb|ccc|dddd|eee|lglobal|llapd|linp|lmux|lmi|lmib|lsms|lctrl|lgtp|lstats|lgsup|loap|lss7|lsccp|lsua|lm3ua|lmgcp|ljibuf|lrspro|lns|lbssgp|lnsdata|lnssignal|liuup|lpfcp|lcsn1) (debug|info|notice|error|fatal)
logging level set-all (debug|info|notice|error|fatal)
logging level force-all (debug|info|notice|error|fatal)
no logging level force-all
@ -472,7 +472,7 @@ DEEE FATAL Log message for DEEE on level LOGL_FATAL
logging_vty_test# list
...
logp (aa|bb|ccc|dddd|eee|lglobal|llapd|linp|lmux|lmi|lmib|lsms|lctrl|lgtp|lstats|lgsup|loap|lss7|lsccp|lsua|lm3ua|lmgcp|ljibuf|lrspro|lns|lbssgp|lnsdata|lnssignal|liuup|lpfcp) (debug|info|notice|error|fatal) .LOGMESSAGE
logp (aa|bb|ccc|dddd|eee|lglobal|llapd|linp|lmux|lmi|lmib|lsms|lctrl|lgtp|lstats|lgsup|loap|lss7|lsccp|lsua|lm3ua|lmgcp|ljibuf|lrspro|lns|lbssgp|lnsdata|lnssignal|liuup|lpfcp|lcsn1) (debug|info|notice|error|fatal) .LOGMESSAGE
...
logging_vty_test# logp?
@ -509,6 +509,7 @@ logging_vty_test# logp ?
lnssignal GPRS NS layer signal PDU
liuup Iu UP layer
lpfcp libosmo-pfcp Packet Forwarding Control Protocol
lcsn1 libosmo-csn1 Concrete Syntax Notation 1 codec
logging_vty_test# logp lglobal ?
debug Log debug messages and higher levels