Description

Provides common logging capability for all RDK components.

Capabilities

Used By

All RDK Components

Uses

IARM

log4c

Used in Features

All

Interfaces

Add link to SVN or published/generated documentation

Owner

Hong Li

Code

Current Version - none

Change History - none

Known issues - none

OCAP RI Logs

By default, stdout is redirected to /opt/logs/ocapri_log.txt for OCAP RI related logs.

Initialization

Logging Configuration

Default level of logging is ERROR. But Logging settings are configured in debug.ini

LOG.RDK.<component1> = FATAL ERROR WARNING NOTICE INFO

LOG.RDK.<component2> = FATAL ERROR WARNING NOTICE INFO DEBUG

Log Levels

  1. RDK_LOG_FATAL
  2. RDK_LOG_ERROR
  3. RDK_LOG_WARN
  4. RDK_LOG_NOTICE
  5. RDK_LOG_INFO
  6. RDK_LOG_DEBUG
  7. RDK_LOG_TRACE1
  8. RDK_LOG_TRACE2
  9. RDK_LOG_TRACE3
  10. RDK_LOG_TRACE4
  11. RDK_LOG_TRACE5
  12. RDK_LOG_TRACE6
  13. RDK_LOG_TRACE7
  14. RDK_LOG_TRACE8
  15. RDK_LOG_TRACE9

Usage

Use RDK_LOG debug message as.


RDK_LOG (rdk_LogLevel level, const char *module, const char *format,...)


Here,

Example:
The debug messages for "INBSI" module
RDK_LOG (RDK_LOG_NOTICE, "LOG.RDK.INBSI","<%s: %s>: Sending PMT_ACQUIRED event\n", PSIMODULE, __FUNCTION__);
Here,
User needs to provide the module name "LOG.RDK.INBSI" , which is the same as mentioned in debug.ini

$ cat debug.ini

EnableMPELog = TRUE
LOG.RDK.INBSI = ALL FATAL ERROR WARNING NOTICE INFO DEBUG

Sample Output:

131011-21:21:49.578394 [mod=INBSI, lvl=NOTICE] [tid=4141] <SITP_PSI: NotifyTableChanged>: Sending PMT_ACQUIRED event

This way user make use of the logger in the respective modules and control the logging levels through configuration file.
Here, No need to build rdklogger again for the addition of new components/module.

Note:

Now, "mediaframework/qamsource/debug.ini" is no more in use, instead "rdklogger/debug.ini" is used and it gets copied to "/mnt/nfs/env"

How to add the rdklogger functionality to the new module

Example:
-lrdkloggers -L ../opensource/lib -llog4c -lglib-2.0

Gstreamer Logging