Syslog Component
The syslog component can be used to send ESPHome logs to a syslog server.
It requires both a UDP component and a Time component to be configured.
# Example configuration entry
udp: addresses: 10.0.0.1
time: platform: sntp
syslog: format: RFC3164Configuration Options
Section titled “Configuration Options”- id (Optional, ID): Manually specify the ID used for code generation.
- udp_id (Required, ID): The ID of the UDP client to use for sending logs. May be omitted if only one UDP client is configured.
- time_id (Required, ID): The ID of the time client to use for time-stamping logs. May be omitted if only one time client is configured.
- port (Optional, int): The port to send logs to. Defaults to
514. - facility (Optional, int): The syslog facility to use. Defaults to
16(corresponding tolocal0). - format (Optional, string): The syslog message format. Supported values are
RFC3164andRFC5424. Defaults toRFC3164. - level (Optional, string): The highest log level to send to the syslog server. Defaults to
DEBUG. - strip (Optional, boolean): If set, remove color-codes from log messages. Defaults to
true.
Message Formats
Section titled “Message Formats”RFC3164 preserves the legacy ESPHome syslog format. If the configured time source does not yet have a valid time,
ESPHome omits the timestamp so that a syslog relay can add it as described by
RFC 3164.
RFC5424 generates a complete RFC 5424 header. ESPHome uses the logger tag
as APP-NAME, and uses the NILVALUE (-) for PROCID, MSGID, and STRUCTURED-DATA. Its timestamp uses the
RFC 3339 format with the configured timezone offset, or the NILVALUE if the time is not valid.
Both formats are sent over UDP. RFC 5424 transport over UDP is described by RFC 5426.