Skip to content

File SolidSyslogConfig.h

FileList > Core > Interface > SolidSyslogConfig.h

The setup-time wiring: the SolidSyslogConfig struct and SolidSyslog_Create / SolidSyslog_Destroy that build and release a logger from it.

  • #include <stdbool.h>
  • #include <stddef.h>
  • #include "SolidSyslogCaptureState.h"
  • #include "SolidSyslogDiscardPolicy.h"
  • #include "SolidSyslogHeaderFieldFunction.h"
  • #include "SolidSyslogTimestamp.h"
  • #include "SolidSyslogExternC.h"

Classes

Type Name
struct SolidSyslogConfig
Wiring for SolidSyslog_Create.

Public Types Documentation

SolidSyslogDestinationKnownFunction

Answers whether the device knows where its collector is.

typedef bool(* SolidSyslogDestinationKnownFunction) (void *context);


SolidSyslogEventReportingFunction

Answers whether the logger is to report one of the library's own events as a syslog record of its own.

typedef bool(* SolidSyslogEventReportingFunction) (void *context);


SolidSyslogHaltCallback

Called once when the logger halts: a queue has refused a record while the discard policy answers Halt.

typedef void(* SolidSyslogHaltCallback) (void *context);

It runs on the task that calls SolidSyslog_Service, after the refusal has been reported and the halt raised as SOLIDSYSLOG_CAT_LOGGER_HALTED, so a callback that stops the device and never returns loses nothing the error handler would have seen. That category says what an error handler that stops the device itself means for this callback.


Public Functions Documentation

SolidSyslog_Create

Create a logger from config .

struct SolidSyslog * SolidSyslog_Create (
    const struct SolidSyslogConfig * config
) 

Never returns NULL: on a NULL config or an exhausted instance pool it reports via SolidSyslog_Error and returns a shared null instance whose Log/Service silently drop, so callers need not null-check the result.


SolidSyslog_Destroy

Release the logger's pool slot, and forget every library event it has not yet reported, so a logger created afterwards reports only what happens after it.

void SolidSyslog_Destroy (
    struct SolidSyslog * handle
) 

Does not free the injected Buffer, Sender, Store, or Sd objects; the caller owns those. A NULL, foreign, or already-destroyed handle is reported via SolidSyslog_Error and ignored.



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