C/C++ API Reference
Loading...
Searching...
No Matches
pw_log_string

Oveview

Main docs: https://pigweed.dev/pw_log_string.

Macros

#define PW_LOG_STRING_CONFIG_HANDLE_MESSAGE(level, module, flags, ...)
 User-provided header to optionally override options in this file.
 
#define PW_LOG_STRING_HANDLE_MESSAGE   PW_LOG_STRING_CONFIG_HANDLE_MESSAGE
 

Functions

void pw_log_string_HandleMessage (int level, unsigned int flags, const char *module_name, const char *file_name, int line_number, const char *message,...)
 
void pw_log_string_HandleMessageVaList (int level, unsigned int flags, const char *module_name, const char *file_name, int line_number, const char *message, va_list args)
 

Macro Definition Documentation

◆ PW_LOG_STRING_CONFIG_HANDLE_MESSAGE

#define PW_LOG_STRING_CONFIG_HANDLE_MESSAGE (   level,
  module,
  flags,
  ... 
)
Value:
do { \
pw_log_string_HandleMessage((level), \
(flags), \
(module), \
__FILE__, \
__LINE__ PW_COMMA_ARGS(__VA_ARGS__)); \
} while (0)

User-provided header to optionally override options in this file.

Default implementation which can be overridden to adjust arguments passed to pw_log_string_HandleMessage.

◆ PW_LOG_STRING_HANDLE_MESSAGE

#define PW_LOG_STRING_HANDLE_MESSAGE   PW_LOG_STRING_CONFIG_HANDLE_MESSAGE

This macro implements PW_LOG using pw_log_string_HandleMessage.

This is the log macro frontend that funnels everything into the C-based message hangler facade, i.e. pw_log_string_HandleMessage. It's not efficient at the callsite, since it passes many arguments.

Users can configure exactly what is passed to pw_log_string_HandleMessage by providing their own PW_LOG_STRING_CONFIG_HANDLE_MESSAGE implementation.

Function Documentation

◆ pw_log_string_HandleMessage()

void pw_log_string_HandleMessage ( int  level,
unsigned int  flags,
const char *  module_name,
const char *  file_name,
int  line_number,
const char *  message,
  ... 
)

Invokes pw_log_string_HandleMessageVaList. This is implemented by the facade.

◆ pw_log_string_HandleMessageVaList()

void pw_log_string_HandleMessageVaList ( int  level,
unsigned int  flags,
const char *  module_name,
const char *  file_name,
int  line_number,
const char *  message,
va_list  args 
)

Logs a message with the listed attributes. This must be implemented by the backend.