C/C++ API Reference
Loading...
Searching...
No Matches
Global config

Overview

These configuration options differ from the options in pw_log/options.h in that these should be set at a global level in the build system rather than at a module or compile unit level.

Macros

#define PW_LOG_LEVEL_DEFAULT   PW_LOG_LEVEL_INFO
 
#define PW_LOG_FLAGS_DEFAULT   0
 
#define PW_LOG_ENABLE_IF(level, verbosity, module, flags)    ((int32_t)(level) >= (int32_t)(verbosity))
 

Macro Definition Documentation

◆ PW_LOG_ENABLE_IF

#define PW_LOG_ENABLE_IF (   level,
  verbosity,
  module,
  flags 
)     ((int32_t)(level) >= (int32_t)(verbosity))

PW_LOG_ENABLE_IF controls which logs are enabled.

This expression determines whether or not the statement is enabled and should be passed to the backend. It is evaluated at the log call site.

◆ PW_LOG_FLAGS_DEFAULT

#define PW_LOG_FLAGS_DEFAULT   0

PW_LOG_FLAGS_DEFAULT controls the default value of PW_LOG_FLAGS.

For log statements like LOG_INFO that don't have an explicit argument, this is used for the flags value.

◆ PW_LOG_LEVEL_DEFAULT

#define PW_LOG_LEVEL_DEFAULT   PW_LOG_LEVEL_INFO

PW_LOG_LEVEL_DEFAULT controls the default value of PW_LOG_LEVEL.

Defaults to PW_LOG_LEVEL_INFO.