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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user