Skip to content

File SolidSyslogError.h

FileList > Core > Interface > SolidSyslogError.h

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 "SolidSyslogExternC.h"
  • #include "SolidSyslogPrival.h"

Classes

Type Name
struct SolidSyslogErrorEvent
What a handler receives.
struct SolidSyslogErrorSource
The identity of an error-emitting class.

Public Types Documentation

SolidSyslogErrorHandler

Installed via SolidSyslog_SetErrorHandler; context is passed back unchanged.

typedef void(* SolidSyslogErrorHandler) (void *context, const struct SolidSyslogErrorEvent *event);

The event is only valid for the duration of the call.


Public Functions Documentation

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.


SolidSyslog_SetErrorHandler

Install the single global error handler.

void SolidSyslog_SetErrorHandler (
    SolidSyslogErrorHandler handler,
    void * context
) 

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

SOLIDSYSLOG_BAD_ARGUMENT_SEVERITY

#define SOLIDSYSLOG_BAD_ARGUMENT_SEVERITY `SOLIDSYSLOG_SEVERITY_CRITICAL`

SOLIDSYSLOG_BAD_CONFIG_FATAL_SEVERITY

#define SOLIDSYSLOG_BAD_CONFIG_FATAL_SEVERITY `SOLIDSYSLOG_SEVERITY_CRITICAL`

SOLIDSYSLOG_POOL_EXHAUSTED_SEVERITY

#define SOLIDSYSLOG_POOL_EXHAUSTED_SEVERITY `SOLIDSYSLOG_SEVERITY_CRITICAL`

SOLIDSYSLOG_UNKNOWN_DESTROY_SEVERITY

#define SOLIDSYSLOG_UNKNOWN_DESTROY_SEVERITY `SOLIDSYSLOG_SEVERITY_WARNING`


The documentation for this class was generated from the following file Core/Interface/SolidSyslogError.h