1
0
mirror of https://github.com/esphome/esphome.git synced 2025-11-18 15:55:46 +00:00

Skip API log message calls for unsubscribed log levels (#9514)

This commit is contained in:
J. Nick Koston
2025-07-15 15:43:55 -10:00
committed by GitHub
parent e152690867
commit 40935f7ae4
3 changed files with 2 additions and 4 deletions

View File

@@ -1404,9 +1404,6 @@ void APIConnection::update_command(const UpdateCommandRequest &msg) {
#endif
bool APIConnection::try_send_log_message(int level, const char *tag, const char *line, size_t message_len) {
if (this->flags_.log_subscription < level)
return false;
// Pre-calculate message size to avoid reallocations
uint32_t msg_size = 0;