Skip to content

syslog: one complete line per packet, per-task buffering - #46

Merged
KrX3D merged 3 commits into
syslogfrom
fix/syslog-one-line-per-packet
Nov 25, 2026
Merged

KrX3D merged 3 commits into
syslogfrom
fix/syslog-one-line-per-packet

Conversation

@KrX3D

@KrX3D KrX3D commented Nov 17, 2026 •

Copy link
Copy Markdown
Owner

Replaces #38 (includes its commit).

  • syslog: serialize output from concurrent tasks #38 only locked single write() calls; all tasks still shared one 128-byte buffer, so partial lines from different tasks were merged and lines over 127 chars were cut into several packets. ESP8266 was not covered at all.
  • Output is now buffered per writer (ESP32 task, ESP8266 loop vs. network-callback context) and sent only on newline: one complete line per packet. Lines over the buffer (512 B ESP32 / 256 B ESP8266) are truncated with ..., never split.
  • CRs are dropped (no more #015), and ESP8266 no longer calls the yielding hostByName() from network callbacks.

Changelog

🤖 Generated with Claude Code

KrX3D and others added 2 commits November 9, 2026 22:30
Debug prints come from the main loop and the AsyncTCP task, which shared
the line buffer and UDP object unguarded, producing garbled and duplicated
syslog lines and risking a one-byte buffer overrun. Also drop an unused
template placeholder from the injected UI and ignore the script's
generated files.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
PR #38 only locked each write() call. All tasks still shared one 128-byte
buffer, so a partial line from one task was merged with another task's line,
lines over 127 chars were split into several packets, and on ESP8266 nothing
was serialized at all.

- Collect output per writer (ESP32 task / ESP8266 loop vs SYS context) and
  send only on newline; long lines are truncated with "..." instead of split
- Drop CR so println() no longer produces "#15"
- ESP8266: skip DNS lookups from network callbacks, hostByName() would yield
  in SYS context

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@KrX3D

KrX3D commented Nov 24, 2026

Copy link
Copy Markdown
Owner Author

localy added

@KrX3D
KrX3D merged commit 026cfaf into syslog Nov 25, 2026
@KrX3D
KrX3D deleted the fix/syslog-one-line-per-packet branch November 25, 2026 16:30
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