Add milliseconds to console output

Add milliseconds to console output (#10152)
This commit is contained in:
Theo Arends 2020-12-17 14:16:53 +01:00
parent eaa9da7d11
commit 078a9a258a
3 changed files with 7 additions and 2 deletions

View File

@ -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]

View File

@ -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

View File

@ -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)) {