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

print task name if logger is called from other than main thread (#6630)

This commit is contained in:
tomaszduda23
2024-05-06 00:10:49 +02:00
committed by GitHub
parent f1584205af
commit 8796a4c1a7
2 changed files with 21 additions and 1 deletions

View File

@@ -167,6 +167,7 @@ class Logger : public Component {
CallbackManager<void(int, const char *, const char *)> log_callback_{};
/// Prevents recursive log calls, if true a log message is already being processed.
bool recursion_guard_ = false;
void *main_task_ = nullptr;
};
extern Logger *global_logger; // NOLINT(cppcoreguidelines-avoid-non-const-global-variables)