Ignore warning/errors with logger

I am currently getting many errors of the following type in my HA log file and I would like to suppress them

2019-09-15 10:04:30 ERROR (stream_worker) [libav.rtsp] Too short data for FU-A H.264 RTP packet

I know they are coming from the onvif camera (but everything works fine)

camera:
  - platform: onvif
    host: !secret front_camera_ip
    port: !secret camera_port
    name: Front
    username: !secret camera_username
    password: !secret camera_password

Looking at https://www.home-assistant.io/components/logger get rid of the errors but not sure what the syntax is for ignoring errors for onvif, can someone assist me please

The doc mentions <component_namespace>. This is what is shown in the error message between the square brackets. In your example it would be libav.rtsp. So you can do:

logger:
  default: error
  logs:
    libav.rtsp: fatal

This will let any messages with a severity level of error or higher through for everything, except for libav.rtsp. For that it will only let messages with a severity level of fatal or higher through, effectively filtering out any that are error or below.

BTW, you can also use libav instead of libav.rtsp. libav would filter any messages where the <component_namespace> starts with libav.

2 Likes