Cant Get Log.<Level>() Func to work #562
-
Syntax errors in Python Scripts get logged; but manually calling log.() in a script doesn't appear to work at all. Home Assistant: Core 2023.12.4 Configuration.yaml includes
peanut.py has the following code (yes, I have tried it in explicitly putting the log level for the script in Configuration.yaml)
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
First, I'm not sure whether the web logs display is the same as the HASS log file. Can anyone confirm that? Next, I'd like to confirm that you don't see logger:
default: debug
logs:
custom_components.pyscript: debug Did you restart HASS after updating the yaml file? The dynamic setting in the function creates a race condition. Since it's implemented as a service call, the |
Beta Was this translation helpful? Give feedback.
First, I'm not sure whether the web logs display is the same as the HASS log file. Can anyone confirm that?
Next, I'd like to confirm that you don't see
log.debug()
messages when you specify:Did you restart HASS after updating the yaml file?
The dynamic setting in the function creates a race condition. Since it's implemented as a service call, the
log.debug()
immediately following won't appear since the service call is unlikely to have been executed yet. I should add that to the documentation....