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

...

RDKB Logger

The

...

RDK logger is

...

a general-purpose logging mechanism used in RDK-B

...

  • By default, the system will look for /etc/debug.ini.
  • rdklogctrl can be used at runtime.

During Boot-up 

...

, utilizing log4c for formatting and supporting multiple log levels for different modules. Each component’s log level is read from the debug.ini configuration file during initialization. Implemented as a shared library, components must link to this library to include logging functionality.

When the unit boots up, each RDK-B component

...

initializes the logger and

...

starts logging into the corresponding log file

...

based on the log level set for the component

...

. This setup enables component-wise logging across RDK-B modules.

Enable/Disable notifications 

...

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

Notification levels 

...

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

...

  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

Log levels and notifications

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.

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

  • rdklogctrl <app_name> <module_name> <loglevel>
    1. To add a new log level - rdklogctrl CcspWifiSsp LOG.RDK.WIFI DEBUG
    2. To remove the existing Log level - rdklogctrl CcspWifiSsp LOG.RDK.WIFI ~DEBUG

rdklogctrl usage examples

...

RDK_LOG_TRACE1,

RDK_LOG_TRACE2,...

...

Changing SSID name

  • Default SSID

...