mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-20 15:56:51 +00:00
Add documentation for logger regex filters (#17160)
* Add documentation for logger regex filters * Tweak Co-authored-by: Franck Nijhof <frenck@frenck.nl>
This commit is contained in:
parent
208bb24714
commit
9d792b032d
@ -88,6 +88,14 @@ where **namespace** is the *<component_namespace>* currently logging.
|
||||
'<component_namespace>':
|
||||
description: Logger namespace of the component. See [log_level](#log-levels).
|
||||
type: string
|
||||
filters:
|
||||
description: Regular Expression logging filters.
|
||||
required: false
|
||||
type: map
|
||||
keys:
|
||||
'<component_namespace>':
|
||||
description: Logger namespace of the component and a list of Regular Expressions. See [Log Filters](#log-filters).
|
||||
type: list
|
||||
{% endconfiguration %}
|
||||
|
||||
In the example, do note the difference between 'glances_api' and 'homeassistant.components.glances' namespaces,
|
||||
@ -110,6 +118,26 @@ Possible log severity levels, listed in order from most severe to least severe,
|
||||
- debug
|
||||
- notset
|
||||
|
||||
### Log Filters
|
||||
|
||||
Service-specific Regular Expression filters for logs. A message is omitted if it matches the Regular Expression.
|
||||
|
||||
An example configuration might look like this:
|
||||
|
||||
```yaml
|
||||
# Example configuration.yaml entry
|
||||
logger:
|
||||
default: info
|
||||
logs:
|
||||
custom_components.my_integration: critical
|
||||
filters:
|
||||
custom_component.my_integartion:
|
||||
- "HTTP 429" # Filter all HTTP 429 errors
|
||||
- "Request to .*unreliable.com.* Timed Out"
|
||||
homeassistant.components.nws:
|
||||
- "^Error handling request$"
|
||||
```
|
||||
|
||||
## Services
|
||||
|
||||
### Service `set_default_level`
|
||||
|
Loading…
x
Reference in New Issue
Block a user