libvisual  0.5.0
Classes | Macros | Typedefs | Enumerations | Functions
VisLog

Classes

struct  VisLogSource
 Contains information on the source of a log message. More...
 

Macros

#define visual_log(severity,...)
 Logs a message. More...
 

Typedefs

typedef void(* VisLogHandlerFunc )(VisLogSeverity severity, const char *message, const VisLogSource *source, void *user_data)
 Function signature for log message handlers. More...
 

Enumerations

enum  VisLogSeverity {
  VISUAL_LOG_DEBUG, VISUAL_LOG_INFO, VISUAL_LOG_WARNING, VISUAL_LOG_ERROR,
  VISUAL_LOG_CRITICAL, VISUAL_LOG_NUM_LEVELS
}
 Message severity levels. More...
 

Functions

void visual_log_set_verbosity (VisLogSeverity level)
 Sets the log verbosity level. More...
 
VisLogSeverity visual_log_get_verbosity (void)
 Returns the current log verbosity level. More...
 
void visual_log_set_handler (VisLogSeverity severity, VisLogHandlerFunc handler, void *user_data)
 Registers a log message handler for a severity level. More...
 
void _lv_log (VisLogSeverity severity, const char *file, int line, const char *funcname, const char *fmt,...) LV_CHECK_PRINTF_FORMAT(5
 

Detailed Description

Macro Definition Documentation

#define visual_log (   severity,
  ... 
)
Value:
_lv_log (severity, \
__FILE__, \
__LINE__, \
__PRETTY_FUNCTION__, \
__VA_ARGS__)

Logs a message.

Parameters
severityMessage severity level
formatprintf format string of the log message
...Format string arguments

Definition at line 106 of file lv_log.h.

Referenced by LV::PluginRegistry::add_path(), LV::Video::allocate_buffer(), LV::Video::convert_depth(), LV::System::init(), LV::Audio::input(), LV::Input::load(), LV::Morph::load(), LV::Actor::load(), LV::Input::run(), LV::Actor::run(), LV::Video::scale(), LV::Actor::video_negotiate(), visual_mem_malloc(), and visual_plugin_realize().

Typedef Documentation

typedef void(* VisLogHandlerFunc)(VisLogSeverity severity, const char *message, const VisLogSource *source, void *user_data)

Function signature for log message handlers.

See Also
visual_log()
Parameters
severityMessage severity level
messageMessage to log
sourceInformation on the message origin
user_dataUser data passed to message handler

Definition at line 73 of file lv_log.h.

Enumeration Type Documentation

Message severity levels.

See Also
visual_log()
Enumerator
VISUAL_LOG_DEBUG 

Debugging information.

VISUAL_LOG_INFO 

Status and general information.

VISUAL_LOG_WARNING 

Warnings.

VISUAL_LOG_ERROR 

Errors.

VISUAL_LOG_CRITICAL 

Critical errors.

VISUAL_LOG_NUM_LEVELS 

Number of log severity levels in total.

Definition at line 42 of file lv_log.h.

Function Documentation

VisLogSeverity visual_log_get_verbosity ( void  )

Returns the current log verbosity level.

Returns
level Current severity level threshold

Definition at line 64 of file lv_log.c.

void visual_log_set_handler ( VisLogSeverity  severity,
VisLogHandlerFunc  handler,
void *  user_data 
)

Registers a log message handler for a severity level.

Parameters
severityMessage severity level
handlerMessage handler callback
user_dataUser data passed to the handler during invocation

Definition at line 69 of file lv_log.c.

void visual_log_set_verbosity ( VisLogSeverity  level)

Sets the log verbosity level.

Any message of a lower severity level will be dropped.

Parameters
levelMinimum severity level

Definition at line 59 of file lv_log.c.