PipeWire  0.3.33
log.c File Reference

Data Structures

struct  log_ctx
 

Macros

#define DEFAULT_LOG_LEVEL   SPA_LOG_LEVEL_WARN
 
#define _log(_c, fmt, ...)
 

Functions

 SPA_LOG_IMPL (default_log)
 
void pw_log_set (struct spa_log *log)
 Set the global log interface. More...
 
bool pw_log_is_default (void)
 
struct spa_logpw_log_get (void)
 Get the global log interface. More...
 
void pw_log_set_level (enum spa_log_level level)
 Set the global log level. More...
 
void pw_log_log (enum spa_log_level level, const char *file, int line, const char *func, const char *fmt,...)
 Log a message. More...
 
void pw_log_logv (enum spa_log_level level, const char *file, int line, const char *func, const char *fmt, va_list args)
 Log a message with va_list. More...
 
void pw_log_log_object (enum spa_log_level level, const char *file, int line, const char *func, uint32_t flags, const void *object)
 

Variables

enum spa_log_level pw_log_level = DEFAULT_LOG_LEVEL
 The global log level. More...
 

Macro Definition Documentation

◆ _log

#define _log (   _c,
  fmt,
  ... 
)
Value:
pw_log_log(_c->level, _c->file, _c->line, _c->func, \
"%*s" fmt, indent, "", ## __VA_ARGS__)

◆ DEFAULT_LOG_LEVEL

#define DEFAULT_LOG_LEVEL   SPA_LOG_LEVEL_WARN

Function Documentation

◆ pw_log_is_default()

bool pw_log_is_default ( void  )

◆ pw_log_log()

void pw_log_log ( enum spa_log_level  level,
const char *  file,
int  line,
const char *  func,
const char *  fmt,
  ... 
)

Log a message.

Parameters
levelthe log level
filethe file this message originated from
linethe line number
functhe function
fmtthe printf style format
...printf style arguments to log

References spa_log::level, pw_log_level_enabled, spa_interface_call, and SPA_UNLIKELY.

Referenced by pw_log_log_object().

◆ pw_log_log_object()

void pw_log_log_object ( enum spa_log_level  level,
const char *  file,
int  line,
const char *  func,
uint32_t  flags,
const void *  object 
)

◆ pw_log_logv()

void pw_log_logv ( enum spa_log_level  level,
const char *  file,
int  line,
const char *  func,
const char *  fmt,
va_list  args 
)

Log a message with va_list.

Parameters
levelthe log level
filethe file this message originated from
linethe line number
functhe function
fmtthe printf style format
argsa va_list of arguments

References spa_log::level, pw_log_level_enabled, spa_interface_call, and SPA_UNLIKELY.

◆ SPA_LOG_IMPL()

SPA_LOG_IMPL ( default_log  )
pw_log_log
void pw_log_log(enum spa_log_level level, const char *file, int line, const char *func, const char *fmt,...)
Log a message.
Definition: log.c:88