RDK Resources
[*RDK Preferred*]
Code Management Facility
RDK Forums
[RDK Conferences]
RDK Support
Archives
Papers & Presentations Archive
Table of Contents | ||
---|---|---|
|
RDK loggers logger is a general purpose logging mechanism which is used for logging in RDK-B. Internally this uses log4c for formatting and support supporting multiple log levels and for different modules. The log level for each component is read from a configuration file debug.ini (rdkb_debug.ini) during component initializationinitialisation. Logger is implemented as a shared library and components need to link this library in order to enable include logging functionality.
RDK logger is linked to RDKB RDK-B modules to enable component wise logging. When the unit boots-up, each RDKB RDK-B component will be initialized initialised which in turn will initialize initialise logger and start logging into the corresponding log file depending on the log level set for the component.
...
All components have the separate TR181 parameters to control the LogLevels and LoggerEnable options.
All component components logger parameters TR181 parameters exist in LogAgent.xml file which is handled by CcspLogAgent component. Those parameters are stored in syscfg.db file for persistent storage.
...
Note: We can enable/disable logging for the all components based on “X_RDKCENTRAL-COM_LoggerEnable” parameter. It is by default set as to “TRUE”.
...
ATOM processor components log messages are passed as a parameter to CcspLogAgent component via D-bus. Then CcspLogAgent routs the logs to rdklogger.
Example: In some of the devices WifiAgent component runs on the ATOM processor
...
...
Steps to add the rdklogger to a new component:
Need to add LoggerEnable and LogLevel parameters in “LogAgent.xml” file for new component.
...
$ X_RDKCENTRAL-COM_New_LoggerEnable=1
Write Code functionality for Loglevel & LoggerEnable parameters set/get in “cosa_apis_logagentplugin.c” file
Initialize Initialise rdklogger by calling rdk_logger_init (/fss/gw/lib/debug.ini) in the NEW component
...
RDK Logger is available in the below path,
../source_code/components/generic/rdk_logger
Below bitbake commands are used for building rdk-logger,
Panel |
---|
$ bitbake -c compile -f rdk-logger $ bitbake rdk-logger $ bitbake rdk-generic-broadband-image |
...