From 078a9a258afa78f9ae90b2faa34340e1533b723a Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Thu, 17 Dec 2020 14:16:53 +0100 Subject: [PATCH] Add milliseconds to console output Add milliseconds to console output (#10152) --- CHANGELOG.md | 2 ++ RELEASENOTES.md | 1 + tasmota/support.ino | 6 ++++-- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 228797c7b..4686ccfb5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ All notable changes to this project will be documented in this file. ## [Unreleased] - Development ## [9.2.0.1] +### Added +- Milliseconds to console output (#10152) ## [Released] diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 5528276ac..058706986 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -58,6 +58,7 @@ The attached binaries can also be downloaded from http://ota.tasmota.com/tasmota ## Changelog v9.2.0.1 ### Added +- Milliseconds to console output (#10152) ### Breaking Changed diff --git a/tasmota/support.ino b/tasmota/support.ino index cb60c41fa..1411a1953 100644 --- a/tasmota/support.ino +++ b/tasmota/support.ino @@ -1952,8 +1952,10 @@ void Syslog(void) void AddLog(uint32_t loglevel) { - char mxtime[10]; // "13:45:21 " - snprintf_P(mxtime, sizeof(mxtime), PSTR("%02d" D_HOUR_MINUTE_SEPARATOR "%02d" D_MINUTE_SECOND_SEPARATOR "%02d "), RtcTime.hour, RtcTime.minute, RtcTime.second); +// char mxtime[10]; // "13:45:21 " +// snprintf_P(mxtime, sizeof(mxtime), PSTR("%02d" D_HOUR_MINUTE_SEPARATOR "%02d" D_MINUTE_SECOND_SEPARATOR "%02d "), RtcTime.hour, RtcTime.minute, RtcTime.second); + char mxtime[14]; // "13:45:21.999 " + snprintf_P(mxtime, sizeof(mxtime), PSTR("%02d" D_HOUR_MINUTE_SEPARATOR "%02d" D_MINUTE_SECOND_SEPARATOR "%02d.%03d "), RtcTime.hour, RtcTime.minute, RtcTime.second, RtcMillis()); if ((loglevel <= TasmotaGlobal.seriallog_level) && (TasmotaGlobal.masterlog_level <= TasmotaGlobal.seriallog_level)) {