Hi everyone,
Since I updated esphome to 2025.11.5, I can’t compile because the syslog component has changed (I had 2025.5.0, so I don’t know when it changed).
My previous configuration was:
syslog:
ip_address: x.x.x.x
port: 514
But now if I leave it like this, I get this error:
src/esphome/components/syslog/syslog_component.cpp: In member function ‘virtual void esphome::syslog::SyslogComponent::setup()’:src/esphome/components/syslog/syslog_component.cpp:36:52: error: cannot convert ‘esphome::syslog::SyslogComponent::setup()::<lambda(int, const char*, const char*)>’ to ‘std::function<void(unsigned char, const char*, const char*, unsigned int)>&&’ 36 | logger::global_logger->add_on_log_callback([this](int level, const char tag, const char message) { | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | | | esphome::syslog::SyslogComponent::setup()::<lambda(int, const char, const char)> 37 | if(!this->enable_logger) return; | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 38 | if(this->strip_colors) { //Strips the “033[0;xxx” at the beginning and the “#033[0m” at the end of log messages | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 39 | std::string org_msg(message); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 40 | this->log(level, tag, org_msg.substr(7, org_msg.size() -7 -4)); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 41 | } else { | ~~~~~~~~ 42 | this->log(level, tag, message); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 43 | } | ~ 44 | }); | ~ In file included from src/esphome/components/syslog/syslog_component.cpp:7:src/esphome/components/logger/logger.h:161:95: note: initializing argument 1 of ‘void esphome::logger::Logger::add_on_log_callback(std::function<void(unsigned char, const char*, const char*, unsigned int)>&&)’ 161 | void add_on_log_callback(std::function<void(uint8_t, const char , const char , size_t)> &&callback); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~Compiling .pioenvs/2-gestione-pt/src/esphome/components/text_sensor/text_sensor.cpp.o* [.pioenvs/2-gestione-pt/src/esphome/components/syslog/syslog_component.cpp.o] Error 1========================= [FAILED] Took 540.25 seconds =========================
Looking at the new component on the website, I should configure it like this:
syslog:
udp:
addresses: x.x.x.x(ip_server)
time:
platform: homeassistant
id: homeassistant_time
But I get the exact same error.
Could someone tell me how to configure sending logs to a syslog server now?
If that doesn’t work for you, post your complete yaml, plus compile logs, properly formatted. Your original post is unreadable since you didn’t wrap the log and yaml between triple backticks (```).