diff --git a/source/_integrations/logger.markdown b/source/_integrations/logger.markdown index e61bca4380a..e01a2f98dbf 100644 --- a/source/_integrations/logger.markdown +++ b/source/_integrations/logger.markdown @@ -88,6 +88,14 @@ where **namespace** is the ** 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`