Versions Compared

Key

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


Table of Contents

Why we need notifications?

  • To ensure that the value is set properly and updated in the database.

Module and component

  • Logging Mechanism: RDKB Logger
    The RDKB logger is linked to RDK-B modules to enable component-wise logging.
  • Component Responsible for Enabling/Disabling Notifications
    • By default, the system will look for /etc/debug.ini.
    • rdklogctrl can be used at runtime.

During Boot-up 

  • When the RPi boots up, each RDK-B component will be initialized, which in turn will initialize the logger and start logging into the corresponding log file, depending on the log level set for the component in /etc/debug.ini

How enable/disable notifications works?

  • Notifications are enabled by default, and the levels can be referred to in /etc/debug.ini.
  • Using rdklogctrl, we can disable the logs from any module integrated with rdklogger

Notification levels 

  • ./etc/debug.ini
    • Logs from different components can be logged into separate files based on the "SEPARATE.LOGFILE.SUPPORT" variable.


    • It also contains entries for each component log levels. Log levels can be controlled independently for each module.

      Example: LOG.RDK.<component name> = ALL, FATAL, ERROR WARNING, NOTICE, INFO, DEBUG

    • For the modules not having entries in configuration file, log level is set to default log levels. (Currently this is set to LOG.RDK.DEFAULT = ERROR in debug.ini)
    • “rdkb_debug.ini” files are parsed by rdk_logger_init() function for loading all the components entry.
  • rdklogctrl <app_name> <module_name> <loglevel>
    1. To add a new log level - dklogctrl CcspWifiSsp LOG.RDK.WIFI DEBUG
    2. To remove the existing Log level - rdklogctrl CcspWifiSsp LOG.RDK.WIFI ~DEBUG
Loge levelsDescription
RDK_LOG_DEBUGInformation that is diagnostically helpful to people more than just developers.
RDK_LOG_ERRORAny error which is fatal to the operation but not the service (cant open a file, missing data, etc)
RDK_LOG_FATALAny error that is forcing a shutdown of the service or application to prevent data loss (or further data loss), reserve these only for the most heinous errors and situations where there is guaranteed to have been data corruption or loss.
RDK_LOG_INFOGenerally useful information to log (service start/stop, configuration assumptions, etc).
RDK_LOG_NOTICEAnything that largely superfluous for application-level logging.

RDK_LOG_TRACE1,

RDK_LOG_TRACE2,...

Only when it would be "tracing" the code and trying to find one part of a function specifically.
RDK_LOG_WARNAnything that can potentially cause application oddities, but for which the application automatically recovering.

Examples

Changing SSID name

  • Default SSID

root@RaspberryPi-Gateway:~#  dmcli eRT getv Device.WiFi.SSID.1.SSID
CR component name is: eRT.com.cisco.spvtg.ccsp.CR
subsystem_prefix eRT.
getv from/to component(eRT.com.cisco.spvtg.ccsp.wifi): Device.WiFi.SSID.1.SSID
Execution succeed.
Parameter    1 name: Device.WiFi.SSID.1.SSID
               type:     string,    value: RPI_RDKB-AP0

...

root@RaspberryPi-Gateway:~# rdklogctrl OneWifi LOG.RDK.WIFI ~DEBUG
Sent message to update log level of LOG.RDK.WIFI for OneWifi process

Changing lan mode (PAM)

  • Module: PAM. By default, the logs are enabled with below log levels

...