Skip to content

Start syslog early enough to capture boot diagnostics - #3489

Merged
proddy merged 2 commits into
emsesp:devfrom
spacekpe:early-syslog
Nov 27, 2026
Merged

proddy merged 2 commits into
emsesp:devfrom
spacekpe:early-syslog

Conversation

@spacekpe

Copy link
Copy Markdown

I've noticed crash information does not appear in syslog because it is initialized way too late. With your recent changes to enlarge syslog buffer to 100 messages we could buffer initial logs and send them when network is available, which is what this PR tries to do.

With this change, these log messages now appear in syslog:

000+00:00:00.000 I 0: Starting Syslog service
000+00:00:00.000 I 1: EMS-ESP version 3.10.0-dev.9a+sp1
000+00:00:00.000 I 2: Last system reset reason Core0: Software reset CPU, Core1: Software reset CPU
000+00:00:00.000 I 3: Starting Commands service
000+00:00:00.000 I 4: Starting Custom Entity service
000+00:00:00.000 I 5: Starting Scheduler service
000+00:00:00.000 I 6: Library loaded: 129 EMS devices, 599 device entities, 13 languages (en,de,nl,sv,pl,no,fr,tr,it,sk,cs,hu,zh)
000+00:00:00.000 W 7: Restarted after a crash (1 in a row)
000+00:00:00.000 I 8: New firmware, it will be confirmed after running for 120 seconds
000+00:00:00.000 W 9: Crash dump found: task=async_tcp pc=0x4000bfed cause=0 vaddr=0x00000000 bt=0x4000bfed 0x4008ad84 0x4008d026 0x40167c86 0x400eee0a 0x400eee69 0x4008ffe9 0x4008e99f 0x400ec3cb 0x400e2ac5 0x400e2d86 0x400dff6f 0x400da7d4 0x400d9997 0x400d6469 0x400ddfc8 sha=
000+00:00:00.000 I 10: Starting Temperature Sensor service
000+00:00:00.000 I 11: Starting Analog Sensor service
000+00:00:00.000 I 12: Starting Web Server
000+00:00:00.000 I 13: Starting Modules service

Timestamps are obviously wrong, but it might not be worth the effort to fix these. Crash dump and Warning message "Restarted after a crash (1 in a row)" is there, which is most important info. Version number is good too.

I've probably did this wrong because I don't understand service inter-dependencies, so please take it as a very rough proposal.

@proddy
proddy merged commit 9b8def9 into emsesp:dev Nov 27, 2026
@proddy

proddy commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

this is good, couldn't find any errors! thanks!

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.

3 participants