24 [
this](
int level,
const char *tag,
const char *message,
size_t message_len) {
25 this->
log_(level, tag, message, message_len);
29void Syslog::log_(
const int level,
const char *tag,
const char *message,
size_t message_len)
const {
34 if ((
unsigned) level <= 7) {
39 size_t len = message_len;
41 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(uint8_t, const char *, const char *, size_t)> &&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, size_t message_len) 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.