setting log level in the logger.yaml:
default: error
works alright, but, when we temporarily set a lower log level for debugging purposes in an automation or the dev service tool:
action:
service: logger.set_level
data:
homeassistant.core: info
homeassistant.components.script: debug
homeassistant.components.automation: debug
and one needs to return to the default (which, remember , was set to ‘error’ in logger), we can’t use a
service and use level ‘default’ eg like:
action:
service: logger.set_level
data:
homeassistant.core: default
homeassistant.components.script: default
homeassistant.components.automation: default
or, even better:
action:
service: logger.set_level
data:
all: default
but need to set it verbosely for the relevant integrations:
action:
service: logger.set_level
data:
homeassistant.core: error
homeassistant.components.script: error
homeassistant.components.automation: error
This is all the more problematic, if one had set the default level via the other service:
action:
service: logger.set_default_level
data_template:
level: >
{{trigger.to_state.state}}
which is using:
input_select:
log_level:
name: Log Level
options:
- critical
- fatal
- error
- warning
- warn
- info
- debug
- notset
icon: mdi:text-box-outline
So, long story short:
please make the log level ‘default’ callable, and add an ‘all’ option to the service logger.set_level
second to that, another cool option would be to have the default field accept a template:
default: >
{{states('input_select.log_level')}}