Skip to content
«interface»SolidSyslogStructuredDataMetaSdCoreOriginSdCoreTimeQualitySdCoreNullSdCore · no-opSolidSyslogCore

Struct SolidSyslogStructuredData

ClassList > SolidSyslogStructuredData

  • #include <SolidSyslogStructuredDataDefinition.h>
struct SolidSyslogStructuredData
{
    void (*Format)(struct SolidSyslogStructuredData* base, struct SolidSyslogSdElement* element);
};

Detailed Description

A structured-data source.

Implementors embed this as the first member of their struct so Format can downcast base back to the instance.

Format runs on the task that formats the message: inside SolidSyslog_Log on any task that logs and, for the SDs given at Create, inside SolidSyslog_Service when the logger reports one of its own events. Those calls can overlap, so a source reached from more than one task must be safe to call concurrently, and one that blocks stalls the task that called it. Writing nothing is a valid answer - a message where no source writes emits NILVALUE - so a source with nothing to report need not invent a value.

Public Attributes Documentation

Format

Write this source's SD-ELEMENT(s) into element .

void(* SolidSyslogStructuredData::Format) (struct SolidSyslogStructuredData *base, struct SolidSyslogSdElement *element);

base is this same object, carrying any per-instance state. The library never allocates the object, so it lives in the implementor's storage.



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