feat(Logging): prefix SD log lines with wall-clock date/time + uptime

SD lines previously carried only millis(), which is meaningless when reading
a log file after the fact without knowing when boot happened. New format:

  2026-07-15 | 12:28:04 | 13460843 -> 🔵 [DEBG][OutputManager] message

Date/time from time(nullptr), set by NTP (Timekeeper::syncTimeWithNTP) —
works regardless of HAS_RTC. Falls back to "unset-date | unset-time" if NTP
hasn't synced yet, rather than printing a bogus 1970 epoch date. Also added
the level icon to SD lines (previously Serial-only) for faster visual
scanning when reading a raw log file.

F-050 in the feature catalog.
This commit is contained in:
2026-07-15 00:33:05 +03:00
parent e737769887
commit 326ae2b767
3 changed files with 49 additions and 7 deletions
+1 -1
View File
@@ -92,7 +92,7 @@ Drops are not silent: the next time that tag is allowed to publish again, a `WAR
```
`timestamp` is `millis()` (ms since boot), not wall-clock time.
**SD line (plain text):** `[LEVL][Tag] message (12345ms)`, written to a day-rotated file — see [FileManager](../FileManager/README.md#log-file-rotation).
**SD line (plain text):** `2026-07-15 | 12:28:04 | 13460843 -> 🔵 [DEBG][Tag] message`, written to a day-rotated file — see [FileManager](../FileManager/README.md#log-file-rotation). Date/time comes from `time(nullptr)` (set by NTP via `Timekeeper::syncTimeWithNTP()`, independent of `HAS_RTC`) — printed as `unset-date | unset-time` if no wall clock is available yet. The number after the second `|` is `millis()` (uptime in ms), unaffected by wall-clock availability.
---