Skip to content

Commit

Permalink
Add milliseconds to console output
Browse files Browse the repository at this point in the history
Add milliseconds to console output (#10152)
  • Loading branch information
arendst committed Dec 17, 2020
1 parent eaa9da7 commit 078a9a2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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]

Expand Down
1 change: 1 addition & 0 deletions RELEASENOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 4 additions & 2 deletions tasmota/support.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 078a9a2

Please sign in to comment.