24 [
this](
int level,
const char *tag,
const char *message) { this->
log_(level, tag, message); });
27void Syslog::log_(
const int level,
const char *tag,
const char *message)
const {
32 if ((
unsigned) level <= 7) {
37 unsigned len = strlen(message);
39 if (this->
strip_ && message[0] == 0x1B &&
len > 11) {
const std::string & get_name() const
Get the name of this Application set by pre_setup().
udp::UDPComponent * parent_
void add_on_log_callback(std::function< void(int, const char *, const char *)> &&callback)
Register a callback that will be called for every log message sent.
time::RealTimeClock * time_
void log_(int level, const char *tag, const char *message) const
ESPTime now()
Get the time in the currently defined timezone.
void send_packet(const uint8_t *data, size_t size)
constexpr int LOG_LEVEL_TO_SYSLOG_SEVERITY[]
Providing packet encoding functions for exchanging data with a remote host.
std::string str_sprintf(const char *fmt,...)
Application App
Global storage of Application pointer - only one Application can exist.
size_t strftime(char *buffer, size_t buffer_len, const char *format)
Convert this ESPTime struct to a null-terminated c string buffer as specified by the format argument.