Skip to content

Add configurable remote syslog logging (UDP/514)#186

Open
czipis wants to merge 1 commit into
dzurikmiroslav:masterfrom
czipis:remote-syslog
Open

Add configurable remote syslog logging (UDP/514)#186
czipis wants to merge 1 commit into
dzurikmiroslav:masterfrom
czipis:remote-syslog

Conversation

@czipis

@czipis czipis commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Forward ESP_LOG* lines to a user-configured remote syslog server over UDP port 514 (RFC 3164), toggled from /settings/network.

  • New components/syslog: NVS config (enabled + host), a FreeRTOS queue fed by the logger callback, and a sender task that frames RFC 3164 packets (facility "user", severity mapped from the ESP log level) and sendto()s them. Drop-newest on a full queue so logging never blocks.
  • logger: add logger_register_line_cb() so a consumer can receive every captured line without logger depending on the network stack.
  • protocols: REST GET/POST /api/v1/config/syslog + aggregate config.
  • main: syslog_init() after network_init().

Web UI sources are not tracked; the change is captured in remote-syslog-webui.patch (NetworkSettings.jsx + locales), placed between the Static IP and Discovery sections. web.cpio is intentionally not committed (rebuilt from the patch).

Description:

as part of this PR are changes to unpublished web sources, adding here the patch for the reverse engineered sources. They might need to be adjusted to actual undisclosed sources.

Related issue (if applicable): fixes # (issue)

Checklist:

  • The pull request is done against the latest master branch
  • The code change compiles without warnings
  • The code change are formatted (clang-format)
  • New and existing unit tests pass

Plase set Github secret WOKWI_CLI_TOKEN to run CI unit test in Wokwi simulator (https://docs.wokwi.com/wokwi-ci/github-actions)

NOTE: The code change must pass CI. Your PR cannot be merged unless CI pass

@czipis czipis force-pushed the remote-syslog branch 4 times, most recently from 3d6eb3e to 2d4e42e Compare June 9, 2026 05:06
Forward ESP_LOG* lines to a user-configured remote syslog server over
UDP port 514 (RFC 3164), toggled from /settings/network.

- New components/syslog: NVS config (enabled + host), a FreeRTOS queue
  fed by the logger callback, and a sender task that frames RFC 3164
  packets (facility "user", severity mapped from the ESP log level) and
  sendto()s them. Drop-newest on a full queue so logging never blocks.
- logger: add logger_register_line_cb() so a consumer can receive every
  captured line without logger depending on the network stack.
- protocols: REST GET/POST /api/v1/config/syslog + aggregate config.
- main: syslog_init() after network_init().

Web UI sources are not tracked; the change is captured in
remote-syslog-webui.patch (NetworkSettings.jsx + locales), placed
between the Static IP and Discovery sections. web.cpio is intentionally
not committed (rebuilt from the patch).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@sonarqubecloud

sonarqubecloud Bot commented Jun 9, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant