Main Page   Data Structures   File List   Data Fields   Globals  

log.h File Reference

Go to the source code of this file.

Typedefs

typedef void(* fluid_log_function_t )(int level, char *message, void *data)

Enumerations

enum  fluid_log_level {
  FLUID_PANIC, FLUID_ERR, FLUID_WARN, FLUID_INFO,
  FLUID_DBG, LAST_LOG_LEVEL
}
 Logging interface. More...


Functions

FLUIDSYNTH_API fluid_log_function_t fluid_set_log_function (int level, fluid_log_function_t fun, void *data)
 fluid_set_log_function installs a new log function for the specified level. More...

FLUIDSYNTH_API void fluid_default_log_function (int level, char *message, void *data)
 fluid_default_log_function is the fluid's default log function. More...

FLUIDSYNTH_API int fluid_log (int level, char *fmt,...)
 print a message to the log. More...


Typedef Documentation

typedef void(* fluid_log_function_t)(int level, char* message, void* data)
 

Definition at line 62 of file log.h.


Enumeration Type Documentation

enum fluid_log_level
 

Logging interface.

The default logging function of the fluidsynth prints its messages to the stderr. The synthesizer uses four level of messages: FLUID_PANIC, ERR, WARN, and FLUID_DBG. They are commented in the definition below.

A client application can install a new log function to handle the messages differently. In the following example, the application sets a callback function to display "FLUID_PANIC" messages in a dialog, and ignores all other messages by setting the log function to NULL:

... fluid_set_log_function(FLUID_PANIC, show_dialog, (void*) root_window); fluid_set_log_function(ERR, NULL, NULL); fluid_set_log_function(WARN, NULL, NULL); fluid_set_log_function(FLUID_DBG, NULL, NULL); ...

Enumeration values:
FLUID_PANIC 
FLUID_ERR 
FLUID_WARN 
FLUID_INFO 
FLUID_DBG 
LAST_LOG_LEVEL 

Definition at line 53 of file log.h.


Function Documentation

FLUIDSYNTH_API void fluid_default_log_function int    level,
char *    message,
void *    data
 

fluid_default_log_function is the fluid's default log function.

It prints to the stderr.

FLUIDSYNTH_API int fluid_log int    level,
char *    fmt,
...   
 

print a message to the log.

FLUIDSYNTH_API fluid_log_function_t fluid_set_log_function int    level,
fluid_log_function_t    fun,
void *    data
 

fluid_set_log_function installs a new log function for the specified level.

It returns the previously installed function.


Generated on Thu Mar 13 19:09:35 2003 for libfluidsynth by doxygen1.2.15