DeterministicESPAsyncWebServer v6.27.1
Zero-allocation, bounded-execution async HTTP server for ESP32
Loading...
Searching...
No Matches
syslog.h File Reference

Zero-heap RFC 5424 syslog client over UDP. More...

#include "ServerConfig.h"
#include <stddef.h>
#include <stdint.h>

Go to the source code of this file.

Detailed Description

Zero-heap RFC 5424 syslog client over UDP.

Ships device log lines to a remote syslog server as RFC 5424 UDP datagrams via the transport-layer UDP service (det_udp_sendto). Split, like the other network services, into a pure host-testable formatter and an ESP32-only send:

  • syslog_format() builds one RFC 5424 line into a caller buffer (no sockets, no heap) - unit-tested on the host (env:native_syslog).
  • syslog_log() formats into a static scratch buffer and sends it to the configured server (a no-op stub off-target).

Emitted line: <PRI>1 - HOSTNAME APP-NAME - - - MSG, where PRI = facility*8 + severity. TIMESTAMP/PROCID/MSGID/STRUCTURED-DATA are the RFC 5424 NILVALUE ("-"); the server stamps its own receipt time. Strings are copied into fixed BSS buffers at init, so nothing must outlive the call.

Definition in file syslog.h.