File SolidSyslogError.h¶
FileList > Core > Interface > SolidSyslogError.h
Go to the source code of this file
The error-reporting API: SolidSyslog_SetErrorHandler to install a handler, SolidSyslog_Error to emit, and the event's Severity / Source / Category / Detail axes a handler reads.
#include <stdint.h>#include "ExternC.h"#include "SolidSyslogPrival.h"
Classes¶
| Type | Name |
|---|---|
| struct | SolidSyslogErrorEvent What a handler receives. |
| struct | SolidSyslogErrorSource The identity of an error-emitting class. |
Public Types¶
| Type | Name |
|---|---|
| typedef void(* | SolidSyslogErrorHandler Installed via SolidSyslog_SetErrorHandler; context is passed back unchanged. |
Public Functions¶
| Type | Name |
|---|---|
| void | SolidSyslog_Error (enum SolidSyslogSeverity severity, const struct SolidSyslogErrorSource * source, uint16_t category, int32_t detail) Emit an event to the installed handler. |
| void | SolidSyslog_SetErrorHandler (SolidSyslogErrorHandler handler, void * context) Install the single global error handler. |
Macros¶
| Type | Name |
|---|---|
| define | SOLIDSYSLOG_BAD_ARGUMENT_SEVERITY SOLIDSYSLOG\_SEVERITY\_CRITICAL |
| define | SOLIDSYSLOG_BAD_CONFIG_FATAL_SEVERITY SOLIDSYSLOG\_SEVERITY\_CRITICAL |
| define | SOLIDSYSLOG_POOL_EXHAUSTED_SEVERITY SOLIDSYSLOG\_SEVERITY\_CRITICAL |
| define | SOLIDSYSLOG_UNKNOWN_DESTROY_SEVERITY SOLIDSYSLOG\_SEVERITY\_WARNING |
Public Types Documentation¶
typedef SolidSyslogErrorHandler¶
Installed via SolidSyslog_SetErrorHandler; context is passed back unchanged.
The event is only valid for the duration of the call.
Public Functions Documentation¶
function SolidSyslog_Error¶
Emit an event to the installed handler.
void SolidSyslog_Error (
enum SolidSyslogSeverity severity,
const struct SolidSyslogErrorSource * source,
uint16_t category,
int32_t detail
)
Called from inside the library at fault sites; integrators building their own Sources call it too.
function SolidSyslog_SetErrorHandler¶
Install the single global error handler.
Intended for setup-time configuration: the slot is one shared pointer, not synchronised against concurrent SolidSyslog_Error emissions. The default handler is a silent no-op; passing handler = NULL restores it.
Macro Definition Documentation¶
define SOLIDSYSLOG_BAD_ARGUMENT_SEVERITY¶
define SOLIDSYSLOG_BAD_CONFIG_FATAL_SEVERITY¶
define SOLIDSYSLOG_POOL_EXHAUSTED_SEVERITY¶
define SOLIDSYSLOG_UNKNOWN_DESTROY_SEVERITY¶
The documentation for this class was generated from the following file Core/Interface/SolidSyslogError.h