LMMS
Loading...
Searching...
No Matches
Logger
LV2 » Log

Classes

struct  LV2_Log_Logger

Functions

static void lv2_log_logger_set_map (LV2_Log_Logger *logger, LV2_URID_Map *map)
static void lv2_log_logger_init (LV2_Log_Logger *logger, LV2_URID_Map *map, LV2_Log_Log *log)
static int lv2_log_vprintf (LV2_Log_Logger *logger, LV2_URID type, const char *fmt, va_list args)
static int lv2_log_error (LV2_Log_Logger *logger, const char *fmt,...)
static int lv2_log_note (LV2_Log_Logger *logger, const char *fmt,...)
static int lv2_log_trace (LV2_Log_Logger *logger, const char *fmt,...)
static int lv2_log_warning (LV2_Log_Logger *logger, const char *fmt,...)

Detailed Description

Convenience API for easy logging in plugin code. This API provides simple wrappers for logging from a plugin, which automatically fall back to printing to stderr if host support is unavailabe.

Function Documentation

◆ lv2_log_error()

int lv2_log_error ( LV2_Log_Logger * logger,
const char * fmt,
... )
inlinestatic

Log an error via lv2_log_vprintf().

◆ lv2_log_logger_init()

void lv2_log_logger_init ( LV2_Log_Logger * logger,
LV2_URID_Map * map,
LV2_Log_Log * log )
inlinestatic

Initialise Logger.

URIs will be mapped using map and stored, a reference to map itself is not held. Both map and Log may be NULL when unsupported by the host, in which case the implementation will fall back to printing to stderr.

◆ lv2_log_logger_set_map()

void lv2_log_logger_set_map ( LV2_Log_Logger * logger,
LV2_URID_Map * map )
inlinestatic

Set map as the URI map for Logger.

This affects the message type URIDs (Error, Warning, etc) which are passed to the log's print functions.

◆ lv2_log_note()

int lv2_log_note ( LV2_Log_Logger * logger,
const char * fmt,
... )
inlinestatic

Log a note via lv2_log_vprintf().

◆ lv2_log_trace()

int lv2_log_trace ( LV2_Log_Logger * logger,
const char * fmt,
... )
inlinestatic

Log a trace via lv2_log_vprintf().

◆ lv2_log_vprintf()

int lv2_log_vprintf ( LV2_Log_Logger * logger,
LV2_URID type,
const char * fmt,
va_list args )
inlinestatic

Log a message to the host, or stderr if support is unavailable.

◆ lv2_log_warning()

int lv2_log_warning ( LV2_Log_Logger * logger,
const char * fmt,
... )
inlinestatic

Log a warning via lv2_log_vprintf().