1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-27 05:03:48 +00:00

host platform: improvements and bugfixes (#6137)

Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
Clyde Stubbs
2024-02-07 12:24:06 +11:00
committed by GitHub
parent 0ede4a3095
commit f3ef05f5c3
7 changed files with 36 additions and 7 deletions

View File

@@ -212,6 +212,14 @@ void HOT Logger::log_message_(int level, const char *tag, int offset) {
return;
#endif
#ifdef USE_HOST
time_t rawtime;
struct tm *timeinfo;
char buffer[80];
time(&rawtime);
timeinfo = localtime(&rawtime);
strftime(buffer, sizeof buffer, "[%H:%M:%S]", timeinfo);
fputs(buffer, stdout);
puts(msg);
#endif