1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-08 22:32:21 +01:00

Optimize logger callback API by including message length parameter (#9368)

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
J. Nick Koston
2025-07-07 17:00:03 -05:00
committed by GitHub
parent fb357b8965
commit ee8ee4e646
9 changed files with 63 additions and 37 deletions

View File

@@ -287,7 +287,8 @@ void WebServer::setup() {
if (logger::global_logger != nullptr && this->expose_log_) {
logger::global_logger->add_on_log_callback(
// logs are not deferred, the memory overhead would be too large
[this](int level, const char *tag, const char *message) {
[this](int level, const char *tag, const char *message, size_t message_len) {
(void) message_len;
this->events_.try_send_nodefer(message, "log", millis());
});
}