MDC (Mapped Diagnostic Context)
MDC is a list of key-value pairs the RIC components can define to be included in their logs.
...
Possible values: sunny, cloudy, rainy, snowy
...
Example:
{"crit":"INFO","ts":1560266556006,"id":"E2Manager","msg":"#rmrCgoApi.Init - RMR router has been initiated","mdc":{"time":"2019-06-11 15:22:36.006"}}
Severity Levels
The following severity levels are used in RIC:
- DEBUG - information useful for debugging
- INFO - informational message related to normal operation
- WARNING - indication of a potential error
- ERROR - error condition
Logging from C
RIC provides a C library for logging: mdclog.
...
|
MDC (Mapped Diagnostic Context)
MDC is a list of key-value pairs the RIC components can define to be included in their logs. It is currently rarely used in RIC.
MDC key | MDC value (type, range, list of values, format, ...) | Description | Components using the MDC | Comments |
---|---|---|---|---|
Weather | Possible values: sunny, cloudy, rainy, snowy | Weather type included in every log made by the Weather Manager. | Weather Manager xApp | This is an example. |
Temperature | Value range from -100.0 to 100.0 with one decimal. Example: 15.5 | Temperature (Celsius degrees) included in every log made by the Weather Manager. | Weather Manager xApp | This is an example. |
time | yyyy-MM-dd HH:mm:ss.SSS | Human readable timestamp. Note that the timezone can be derived from comparing this value against the ts millisecond timestamp in the same log entry. | E2 Manager | Example: {"crit":"INFO","ts":1560266556006,"id":"E2Manager","msg":"#rmrCgoApi.Init - RMR router has been initiated","mdc":{"time":"2019-06-11 15:22:36.006"}} |
Severity Levels
The following severity levels are used in RIC:
- DEBUG - information useful for debugging
- INFO - informational message related to normal operation
- WARNING - indication of a potential error
- ERROR - error condition
Fields in the log entry
- ts – Timestamp, number of milliseconds since Unix Epoch (i.e. 1970-01-01 00:00:00 +0000 (UTC)), set by the logging library
- crit – Severity level of the log, given by the application process: DEBUG, INFO, WARNING, ERROR
- id – the name of the process, set by the logging library
- msg – log message given by the application process
- mdc – a list of key value pairs, both strings, unique key names, given by the application process
...