PipeWire: pw_log Class Reference

PipeWire 0.1.9

Public Member Functions
pw_log Class Reference

Logging functions of PipeWire. More...

## Public Member Functions
#define | pw_log_level_enabled(lev) (pw_log_level >= (lev))
| Check if a loglevel is enabled. More...
void | pw_log_set (struct spa_log *log)
| Set the global log interface. More...
struct spa_log * | pw_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_error (const char *format,...)
| Log an error message. More...
void | pw_log_warn (const char *format,...)
| Log a warning message. More...
void | pw_log_info (const char *format,...)
| Log an info message. More...
void | pw_log_debug (const char *format,...)
| Log a debug message. More...
void | pw_log_trace (const char *format,...)
| Log a trace message. More...

## Detailed Description

Logging functions of PipeWire.

Logging is performed to stdout and stderr. Trace logging is performed in a lockfree ringbuffer and written out from the main thread as to not block the realtime threads.

## Member Function Documentation

## ◆ pw_log_debug()

void pw_log_debug | ( | const char * | format,
|  |  | ...
| ) |  |

Log a debug message.

Parameters

  format | a printf style format
  ... | printf style arguments

Referenced by pw_client::pw_client_destroy(), pw_client::pw_client_new(), pw_client_register(), pw_client_set_busy(), pw_control_destroy(), pw_control_link(), pw_control_new(), pw_control_unlink(), pw_core::pw_core_destroy(), pw_core::pw_core_find_format(), pw_core::pw_core_find_port(), pw_core::pw_core_new(), pw_data_loop::pw_data_loop_destroy(), pw_data_loop::pw_data_loop_new(), pw_factory_destroy(), pw_factory_new(), pw_global::pw_global_destroy(), pw_global::pw_global_new(), pw_global::pw_global_register(), pw_link_activate(), pw_link_add_listener(), pw_link_deactivate(), pw_link_destroy(), pw_link_new(), pw_main_loop::pw_main_loop_destroy(), pw_main_loop::pw_main_loop_new(), pw_main_loop::pw_main_loop_quit(), pw_main_loop::pw_main_loop_run(), pw_memblock::pw_memblock_free(), pw_memblock_import(), pw_memblock::pw_memblock_map(), pw_module::pw_module_destroy(), pw_module::pw_module_load(), pw_node::pw_node_destroy(), pw_node::pw_node_get_free_port(), pw_node_new(), pw_node_register(), pw_node_set_active(), pw_node_set_enabled(), pw_node::pw_node_set_state(), pw_node::pw_node_update_state(), pw_port_add(), pw_port_alloc_buffers(), pw_port_destroy(), pw_port_new(), pw_port_set_param(), pw_port_use_buffers(), pw_proxy::pw_proxy_destroy(), pw_proxy::pw_proxy_new(), pw_remote_destroy(), pw_remote_disconnect(), pw_remote_new(), pw_remote_update_state(), pw_resource_destroy(), pw_resource_new(), pw_stream_destroy(), pw_stream_finish_format(), pw_stream_new(), pw_stream_send_buffer(), pw_thread_loop::pw_thread_loop_new(), pw_thread_loop::pw_thread_loop_stop(), pw_work_queue::pw_work_queue_add(), pw_work_queue::pw_work_queue_cancel(), pw_work_queue::pw_work_queue_complete(), pw_work_queue::pw_work_queue_destroy(), and pw_work_queue::pw_work_queue_new().

## ◆ pw_log_error()

void pw_log_error | ( | const char * | format,
|  |  | ...
| ) |  |

Log an error message.

Parameters

  format | a printf style format
  ... | printf style arguments

Referenced by pw_memblock::pw_memblock_alloc(), pw_node::pw_node_get_free_port(), and pw_remote_new().

## ◆ pw_log_get()

struct spa_log * pw_log_get | ( | void |  | ) |

Get the global log interface.

Returns
  the global log

Referenced by pw_core::pw_core_new().

## ◆ pw_log_info()

void pw_log_info | ( | const char * | format,
|  |  | ...
| ) |  |

Log an info message.

Parameters

  format | a printf style format
  ... | printf style arguments

Referenced by pw_protocol_add_marshal(), pw_protocol_destroy(), and pw_protocol_new().

## ◆ 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

  level | the log level
  file | the file this message originated from
  line | the line number
  func | the function
  fmt | the printf style format
  ... | printf style arguments to log

References pw_log_level_enabled.

## ◆ 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

  level | the log level
  file | the file this message originated from
  line | the line number
  func | the function
  fmt | the printf style format
  args | a va_list of arguments

References pw_log_level_enabled.

## ◆ pw_log_set()

void pw_log_set | ( | struct spa_log * | log | ) |

Set the global log interface.

Parameters

  log | the global log to set

## ◆ pw_log_set_level()

void pw_log_set_level | ( | enum spa_log_level | level | ) |

Set the global log level.

Parameters

  level | the new log level

References pw_log_level.

## ◆ pw_log_trace()

void pw_log_trace | ( | const char * | format,
|  |  | ...
| ) |  |

Log a trace message.

Trace messages may be generated from

Parameters

  format | a printf style format
  ... | printf style arguments realtime threads

## ◆ pw_log_warn()

void pw_log_warn | ( | const char * | format,
|  |  | ...
| ) |  |

Log a warning message.

Parameters

  format | a printf style format
  ... | printf style arguments

Referenced by pw_control_unlink(), pw_memblock::pw_memblock_alloc(), and pw_work_queue::pw_work_queue_destroy().

The documentation for this class was generated from the following files:

- log.h
- log.c