Reputation: 2146
I'm running a docker CE setup and according to docker info
the active logger is json-file
. Nevertheless, my syslog is getting spammed with logs about NetworDB
Aug 21 23:45:17 myhost dockerd[859]: time="2019-08-21T23:45:17.488796292+02:00" level=info msg="NetworkDB stats myhost(68894b27f787) - netID:tm84fou4w4x98tgpqv19femay leaving:false netPeers:1 entries:6 Queue qLen:0 netMsg/s:0"
where is this message coming from? How can i configure it / disable it?
Upvotes: 0
Views: 1921
Reputation: 311288
The active logger you see in docker info
refers to the log driver used to collect container logs. What you see is a log message from dockerd
itself.
Assuming that your dockerd
is started by systemd
, the logs show up in syslog because dockerd
writes them to stdout/stderr and systemd collects the output and writes it to the system log. You have a few mechanisms to deal with this:
Reduce Docker's logging verbosity by setting the --log-level
command line option:
dockerd --log-level=warn ...
(You would probably need to modify the docker.service
unit to add this parameter, ideally through the use of a drop-in configuration file).
You can redirect the logs to a file instead by setting the StandardOutput
parameter in the docker.service
unit (using a drop-in as above).
You can use a syslog daemon with filtering capabilities (like syslog-ng or rsyslog) to suppress the messages or redirect them to a different file from the main log.
Personally, I wouldn't bother with any of the above: it is unlikely that the log output from dockerd
is causing a real problem, and if a problem crops up it's better to have too many logs rather than not enough.
Upvotes: 1