Files
esphome/esphome/components
J. Nick Koston e9fee86c9d [logger] Replace LogListener virtual interface with LogCallback struct
Replace the LogListener abstract class (single pure virtual method) with
a lightweight LogCallback struct containing a function pointer + instance
pointer. This eliminates a vtable sub-table and thunk from every class
that previously inherited LogListener.

Savings per former LogListener implementer:
- 12 bytes vtable (sub-table header + thunk slot)
- 4 bytes vtable (on_log in primary table)
- ~23 bytes thunk code
- ~39 bytes total per class

Affected classes: APIServer, WebServer, MQTTClientComponent, Syslog,
BLENUS, LoggerMessageTrigger (6 classes, ~234 bytes total).

The non-capturing lambdas used at registration sites decay to plain
function pointers at compile time -- zero closure/std::function overhead.
2026-02-18 22:42:59 -06:00
..
2025-06-11 17:06:45 +12:00
2025-06-11 17:06:45 +12:00
2025-01-22 12:56:51 +13:00
2025-06-11 17:06:45 +12:00
2025-06-11 17:06:45 +12:00
2025-10-22 22:24:17 -04:00
2025-12-08 14:37:45 -05:00
2025-06-11 17:06:45 +12:00
2025-10-06 16:10:46 -04:00
2025-11-04 10:45:32 +13:00
2025-06-11 17:06:45 +12:00
2026-02-10 22:10:29 -05:00
2025-11-01 17:45:42 +11:00
2025-06-11 17:06:45 +12:00
2025-12-08 14:37:45 -05:00
2025-06-11 17:06:45 +12:00