Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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.

...

python3 -m pip install mdclogpy


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 keyMDC value (type, range, list of values, format, ...)DescriptionComponents using the MDCComments
Weather

Possible values: sunny, cloudy, rainy, snowy

Weather type included in every log made by the Weather Manager.Weather Manager xAppThis is an example.
TemperatureValue range from -100.0 to 100.0 with one decimal. Example: 15.5Temperature (Celsius degrees) included in every log made by the Weather Manager.Weather Manager xAppThis is an example.
timeyyyy-MM-dd HH:mm:ss.SSSHuman 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

...