| 
    C-Pluff C API
    0.2.0
    
   | 
 
These functions can be used to receive and emit log messages related to a particular plug-in context. More...
Functions | |
| CP_IMPORT cp_status_t | cp_register_logger (cp_context_t *ctx, cp_logger_func_t logger, void *user_data, cp_log_severity_t min_severity) | 
| Registers a logger with a plug-in context or updates the settings of a registered logger.  More... | |
| CP_IMPORT void | cp_unregister_logger (cp_context_t *ctx, cp_logger_func_t logger) | 
| Removes a logger registration.  More... | |
| CP_IMPORT void | cp_log (cp_context_t *ctx, cp_log_severity_t severity, const char *msg) | 
| Emits a new log message.  More... | |
| CP_IMPORT int | cp_is_logged (cp_context_t *ctx, cp_log_severity_t severity) | 
| Returns whether a message of the specified severity would get logged.  More... | |
These functions can be used to receive and emit log messages related to a particular plug-in context.
They can be used by the main program or by a plug-in runtime.
| CP_IMPORT cp_status_t cp_register_logger | ( | cp_context_t * | ctx, | 
| cp_logger_func_t | logger, | ||
| void * | user_data, | ||
| cp_log_severity_t | min_severity | ||
| ) | 
Registers a logger with a plug-in context or updates the settings of a registered logger.
The logger will receive selected log messages. If the specified logger is not yet known, a new logger registration is made, otherwise the settings for the existing logger are updated. The logger can be unregistered using cp_unregister_logger and it is automatically unregistered when the registering plug-in is stopped or when the context is destroyed.
| ctx | the plug-in context to log | 
| logger | the logger function to be called | 
| user_data | the user data pointer passed to the logger | 
| min_severity | the minimum severity of messages passed to logger | 
| CP_IMPORT void cp_unregister_logger | ( | cp_context_t * | ctx, | 
| cp_logger_func_t | logger | ||
| ) | 
Removes a logger registration.
| ctx | the plug-in context | 
| logger | the logger function to be unregistered | 
| CP_IMPORT void cp_log | ( | cp_context_t * | ctx, | 
| cp_log_severity_t | severity, | ||
| const char * | msg | ||
| ) | 
Emits a new log message.
| ctx | the plug-in context | 
| severity | the severity of the event | 
| msg | the log message (possibly localized) | 
| CP_IMPORT int cp_is_logged | ( | cp_context_t * | ctx, | 
| cp_log_severity_t | severity | ||
| ) | 
Returns whether a message of the specified severity would get logged.
| ctx | the plug-in context | 
| severity | the target logging severity | 
Generated on Fri May 1 2020 01:06:58 for C-Pluff C API by 
 1.8.13