Allow configuring the Docker log driver

I attempted to switch the Docker log driver from journald to syslog in /etc/docker/daemon.json, but it looks like the daemon is being started with a flag to use journald:

Sep 06 11:33:49 homeassistant.local dockerd[352]: time=“2021-09-06T11:33:49.625146802Z” level=info msg=“Configured log driver does not support reads, enabling local file cache for container logs” container=46029d3afe41df57fc0d230f118c849deb9fd07d82afd78027fabcf5f4da36bc driver=syslog

It looks like that config is on a read-only file system, so I can’t change the flag. Is there another way to change this setting?

I realized it was possible to write an addon to do this by attaching to the docker socket. I’ve created an an initial app and addon at GitHub - deviantintegral/docker_logs_forwarder_addon: A Home Assistant OS container to forward logs to another service.

The biggest limitation is early startup logs, and logs on the host side of HAOS itself. Otherwise, this has already been useful allowing me to create “errors and warnings” dashboards in Graylog to see if things change after updates.