rocDecode logging control

rocDecode logging control#

rocDecode core components can be configured to output different levels of log messages during decoding.

The log level can be changed by either setting the log level through the ROCDEC_LOG_LEVEL environment variable, or by calling the RocDecLogger::SetLogLevel() function in commons.h.

The logging levels are:

0: Critical (Default level, Only output critical messages)
1: Error (Output critical and error messages)
2: Warning (Output critical, error and warning messages)
3: Info (Output critical, error, warning and info messages)
4: Debug (Output critical, error, warning, info and debug messages)

The log level defines the maximum severity of log messages to output. For example, to output warning and error messages as well as critical messages, ROCDEC_LOG_LEVEL would need to be set to 2:

ROCDEC_LOG_LEVEL = 2

or

SetLogLevel(2);