Skip to content

Core

Core/ is the guts of SolidSyslog: it implements the syslog protocol and manages the assembly, buffering, storage and sending of log messages.

Core/ depends on nothing external: always compiled, typically as a library. It holds the facade you call, the pipeline that formats a record and drains it, and portable implementations for several roles. Where access to a network stack, encryption, filesystem or OS is required, an interface is declared. Platform components that satisfy those interfaces let Core build with no platform dependencies.

Where a platform exists to reach your hardware, Core exists to be the same everywhere.

SolidSyslog architecture. The Core rectangle is a boundary holding the SolidSyslog facade and its roles - all portable C. You wire roles on the facade: Sender, Store, Buffer and StructuredData. The roles that reach your system - name resolution, UDP sockets, TCP sockets and a TLS library; the filesystem and a crypto library; an OS mutex; atomics - cross the Core boundary through a thin platform adapter you supply. Dependency points inward: Core touches nothing outside itself.

The facade and every role link through to their API page; the platform-adapter band links to Platforms.

The facade

Header Provides
SolidSyslog.h SolidSyslog_Log, SolidSyslog_LogWithSd, SolidSyslog_Service - the whole runtime surface
SolidSyslogConfig.h SolidSyslog_Create, SolidSyslog_Destroy, and the SolidSyslogConfig struct you fill

What it ships

Portable role implementations - no platform required:

Class Role
SolidSyslogPassthroughBuffer Buffer - sends inline, no queue
SolidSyslogCircularBuffer Buffer - ring over caller-supplied memory, mutex injected
SolidSyslogUdpSender Sender - RFC 5426 over a Datagram
SolidSyslogStreamSender Sender - RFC 6587 octet framing over any Stream
SolidSyslogSwitchingSender Sender - delegates to one of several inners
SolidSyslogBlockStore Store - store-and-forward over rotating blocks
SolidSyslogFileBlockDevice BlockDevice - sequence-numbered files over a File
SolidSyslogCrc16Policy SecurityPolicy - CRC-16 integrity (accidental corruption, not tamper)
SolidSyslogMetaSd StructuredData - sequenceId, sysUpTime, language
SolidSyslogTimeQualitySd StructuredData - tzKnown, isSynced, syncAccuracy
SolidSyslogOriginSd StructuredData - software, swVersion, enterpriseId, ip

Every role also has a Null - SolidSyslogNull<Role>_Get(), or SolidSyslogNullSd_Get() for StructuredData - whose methods are safe no-ops. That is what an unfilled slot resolves to, and what a <Class>_Create returns when its pool is exhausted, so nothing dangles and nothing needs a NULL guard. See Roles.

Cross-cutting

Header Provides
SolidSyslogError.h install a handler for library-internal errors; the default is a silent no-op. Every axis of an event names itself: the severity, the category and, through its source, the detail
SolidSyslogConfigLock.h inject a lock pair around the pool slot walks; no-ops by default, single-task safe. It does not make SolidSyslog_Service safe to share across tasks - see its threading contract
SolidSyslogTunablesDefaults.h every compile-time limit, each #ifndef-guarded so you override without editing the library

Requirements

A C99 compiler, and nothing else. No dynamic memory - every stateful class lives in a library-internal static pool - and no OS, network or filesystem dependency. What it cannot do alone, it delegates to a role for a platform to fill.