mirror of https://gerrit.osmocom.org/libosmocore
logging: add libosmo-abis logging subsystems
This adds the libosmo-abis logging subsystems to libosmocore, it uses the new change that harald proposed based on negative numbers for library logging subsystems.
This commit is contained in:
parent
39c0243d9b
commit
199f37723b
|
@ -39,7 +39,13 @@ void logp(int subsys, char *file, int line, int cont, const char *format, ...) _
|
||||||
/* logging levels defined by the library itself */
|
/* logging levels defined by the library itself */
|
||||||
#define DLGLOBAL -1
|
#define DLGLOBAL -1
|
||||||
#define DLLAPDM -2
|
#define DLLAPDM -2
|
||||||
#define OSMO_NUM_DLIB 2
|
#define DINP -3
|
||||||
|
#define DMUX -4
|
||||||
|
#define DMI -5
|
||||||
|
#define DMIB -6
|
||||||
|
#define DRSL -7
|
||||||
|
#define DNM -8
|
||||||
|
#define OSMO_NUM_DLIB 9
|
||||||
|
|
||||||
struct log_category {
|
struct log_category {
|
||||||
uint8_t loglevel;
|
uint8_t loglevel;
|
||||||
|
|
|
@ -72,6 +72,40 @@ static const struct log_info_cat internal_cat[OSMO_NUM_DLIB] = {
|
||||||
.loglevel = LOGL_NOTICE,
|
.loglevel = LOGL_NOTICE,
|
||||||
.enabled = 1,
|
.enabled = 1,
|
||||||
},
|
},
|
||||||
|
[INT2IDX(DINP)] = {
|
||||||
|
.name = "DINP",
|
||||||
|
.description = "A-bis Intput Subsystem",
|
||||||
|
.loglevel = LOGL_NOTICE,
|
||||||
|
.enabled = 1,
|
||||||
|
},
|
||||||
|
[INT2IDX(DMUX)] = {
|
||||||
|
.name = "DMUX",
|
||||||
|
.description = "A-bis B-Subchannel TRAU Frame Multiplex",
|
||||||
|
.loglevel = LOGL_NOTICE,
|
||||||
|
.enabled = 1,
|
||||||
|
},
|
||||||
|
[INT2IDX(DMI)] = {
|
||||||
|
.name = "DMI",
|
||||||
|
.description = "A-bis Input Driver for Signalling",
|
||||||
|
.enabled = 0, .loglevel = LOGL_NOTICE,
|
||||||
|
},
|
||||||
|
[INT2IDX(DMIB)] = {
|
||||||
|
.name = "DMIB",
|
||||||
|
.description = "A-bis Input Driver for B-Channels (voice)",
|
||||||
|
.enabled = 0, .loglevel = LOGL_NOTICE,
|
||||||
|
},
|
||||||
|
[INT2IDX(DRSL)] = {
|
||||||
|
.name = "DRSL",
|
||||||
|
.description = "A-bis Radio Siganlling Link (RSL)",
|
||||||
|
.color = "\033[1;35m",
|
||||||
|
.enabled = 1, .loglevel = LOGL_NOTICE,
|
||||||
|
},
|
||||||
|
[INT2IDX(DNM)] = {
|
||||||
|
.name = "DNM",
|
||||||
|
.description = "A-bis Network Management / O&M (NM/OML)",
|
||||||
|
.color = "\033[1;36m",
|
||||||
|
.enabled = 1, .loglevel = LOGL_INFO,
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
/* You have to keep this in sync with the structure loglevel_strs. */
|
/* You have to keep this in sync with the structure loglevel_strs. */
|
||||||
|
|
Loading…
Reference in New Issue