ESPHome
2024.10.2
esphome
esphome
components
logger
logger_host.cpp
Go to the documentation of this file.
1
#if defined(USE_HOST)
2
#include "
logger.h
"
3
4
namespace
esphome
{
5
namespace
logger {
6
7
void
HOT
Logger::write_msg_
(
const
char
*msg) {
8
time_t rawtime;
9
struct
tm *timeinfo;
10
char
buffer[80];
11
12
time(&rawtime);
13
timeinfo = localtime(&rawtime);
14
strftime(buffer,
sizeof
buffer,
"[%H:%M:%S]"
, timeinfo);
15
fputs(buffer, stdout);
16
puts(msg);
17
}
18
19
void
Logger::pre_setup
() {
global_logger
=
this
; }
20
21
}
// namespace logger
22
}
// namespace esphome
23
24
#endif
esphome::logger::global_logger
Logger * global_logger
Definition:
logger.cpp:198
esphome::logger::Logger::pre_setup
void pre_setup()
Set up this component.
Definition:
logger_esp32.cpp:82
logger.h
esphome
Implementation of SPI Controller mode.
Definition:
a01nyub.cpp:7
esphome::logger::Logger::write_msg_
void write_msg_(const char *msg)
Definition:
logger_esp32.cpp:160
Generated by
1.8.13