Roc Toolkit internal modules
Roc Toolkit: real-time audio streaming
roc::core::Logger Class Reference

Logger. More...

#include <log.h>

Inheritance diagram for roc::core::Logger:
Collaboration diagram for roc::core::Logger:

Public Member Functions

void print (const char *module, LogLevel level, const char *format,...) ROC_ATTR_PRINTF(4
 Print message to log. More...
 
void LogLevel level ()
 Get current maximum log level. More...
 
void set_level (LogLevel)
 Set maximum log level. More...
 
void set_handler (LogHandler handler)
 Set log handler. More...
 
void set_colors (ColorsMode mode)
 Set colors mode. More...
 

Static Public Member Functions

static Loggerinstance ()
 Get logger instance. More...
 

Friends

class Singleton< Logger >
 

Detailed Description

Logger.

Definition at line 57 of file log.h.

Member Function Documentation

static Logger& roc::core::Logger::instance ( )
inlinestatic

Get logger instance.

Definition at line 60 of file log.h.

void LogLevel roc::core::Logger::level ( )

Get current maximum log level.

void roc::core::Logger::print ( const char *  module,
LogLevel  level,
const char *  format,
  ... 
)

Print message to log.

void roc::core::Logger::set_colors ( ColorsMode  mode)

Set colors mode.

Note
Default colors mode is ColorsAuto.
void roc::core::Logger::set_handler ( LogHandler  handler)

Set log handler.

Remarks
If handler is not NULL, log messages will be passed to handler. Otherwise, they're printed to stderr.Default log handler is NULL.
void roc::core::Logger::set_level ( LogLevel  )

Set maximum log level.

Remarks
Messages with higher log level will be dropped.
Note
Default log level is LogError.

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