Limit the amount of logs printed by HA in Docker

I’ve checked the logger and system log pages and it wasn’t fully clear to me what configures the logs that are displayed by Home Assistant in Docker. E.g. when doing docker logs home-assistant -f it already takes a minute or so for all the logs to display on the screen all the way to the bottom.

I guess there are two options:

  1. Limit the log printing of HA --> would be good for the SD card life
  2. Limit the nr of logs kept by Docker

Ideally I would like HA to print less logs so the SD card is less worn out. Anything of log level warning or higher is OK to be printed, all the other stuff is not very interesting anyway.

Has anyone done this? What configuration should be used?


Are you talking about the syslog shown in homeassistant.log?


The logbook


The recorder component?

The first doesn’t write much, if it does you need to take care of those errors or change your logging level.

The second and third rely on the recorder and that can be adjusted. I only record data on the entities that I want to see a history on. This significantly reduces the amount of data written.

1 Like

Recorder i have a whitelist for.
Logbook I haven’t touched.

I’m not sure what logs are printed when doing docker logs on the container.

You talk about log level, if I change the default log level, specifying it with the logger component, that would probably reduce the output in the terminal/docker I suppose?

The logger component seems to say that the default log level is info, which would explain all the output.