Go to the source code of this file.
Typedefs | |
| typedef void(* | fluid_log_function_t )(int level, char *message, void *data) |
| Log function handler callback type used by fluid_set_log_function(). | |
Enumerations | |
| enum | fluid_log_level { FLUID_PANIC, FLUID_ERR, FLUID_WARN, FLUID_INFO, FLUID_DBG, LAST_LOG_LEVEL } |
| FluidSynth log levels. More... | |
Functions | |
| FLUIDSYNTH_API fluid_log_function_t | fluid_set_log_function (int level, fluid_log_function_t fun, void *data) |
| Installs a new log function for a specified log level. | |
| FLUIDSYNTH_API void | fluid_default_log_function (int level, char *message, void *data) |
| Default log function which prints to the stderr. | |
| FLUIDSYNTH_API int | fluid_log (int level, char *fmt,...) |
| Print a message to the log. | |
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:
DOCME (formatting) fluid_set_log_function(FLUID_PANIC, show_dialog, (void*) root_window); fluid_set_log_function(FLUID_ERR, NULL, NULL); fluid_set_log_function(FLUID_WARN, NULL, NULL); fluid_set_log_function(FLUID_DBG, NULL, NULL);
Definition in file log.h.
| typedef void(* fluid_log_function_t)(int level, char *message, void *data) |
Log function handler callback type used by fluid_set_log_function().
| level | Log level (fluid_log_level) | |
| message | Log message text | |
| data | User data pointer supplied to fluid_set_log_function(). |
| enum fluid_log_level |
| FLUIDSYNTH_API fluid_log_function_t fluid_set_log_function | ( | int | level, | |
| fluid_log_function_t | fun, | |||
| void * | data | |||
| ) |
Installs a new log function for a specified log level.
| level | Log level to install handler for. | |
| fun | Callback function handler to call for logged messages | |
| data | User supplied data pointer to pass to log function |
Definition at line 73 of file fluid_sys.c.
References fluid_set_log_function(), and LAST_LOG_LEVEL.
Referenced by fluid_set_log_function().
| FLUIDSYNTH_API void fluid_default_log_function | ( | int | level, | |
| char * | message, | |||
| void * | data | |||
| ) |
Default log function which prints to the stderr.
| level | Log level | |
| message | Log message | |
| data | User supplied data (not used) |
Definition at line 92 of file fluid_sys.c.
References FLUID_DBG, fluid_default_log_function(), FLUID_ERR, FLUID_INFO, FLUID_PANIC, and FLUID_WARN.
Referenced by fluid_default_log_function().
| FLUIDSYNTH_API int fluid_log | ( | int | level, | |
| char * | fmt, | |||
| ... | ||||
| ) |
Print a message to the log.
| level | Log level (fluid_log_level). | |
| fmt | Printf style format string for log message | |
| ... | Arguments for printf 'fmt' message string |
Definition at line 171 of file fluid_sys.c.
References fluid_log(), and LAST_LOG_LEVEL.
Referenced by fluid_log(), and new_fluid_event().
1.5.3