mirror of
https://github.com/esphome/esphome.git
synced 2024-11-10 01:07:45 +01:00
Log component long time message at warning level (#5048)
This commit is contained in:
parent
d64d1650e3
commit
fd9cca565b
1 changed files with 2 additions and 2 deletions
|
@ -201,8 +201,8 @@ WarnIfComponentBlockingGuard::~WarnIfComponentBlockingGuard() {
|
|||
uint32_t now = millis();
|
||||
if (now - started_ > 50) {
|
||||
const char *src = component_ == nullptr ? "<null>" : component_->get_component_source();
|
||||
ESP_LOGV(TAG, "Component %s took a long time for an operation (%.2f s).", src, (now - started_) / 1e3f);
|
||||
ESP_LOGV(TAG, "Components should block for at most 20-30ms.");
|
||||
ESP_LOGW(TAG, "Component %s took a long time for an operation (%.2f s).", src, (now - started_) / 1e3f);
|
||||
ESP_LOGW(TAG, "Components should block for at most 20-30ms.");
|
||||
;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue