1
votes

I have my logging driver setup of journald. Does the log-level config in daemon.json file impact logs when using a logging driver or only the container logs when using docker logs <container_name> ?

For example, docker and journald have documentation showing how to set log level/priority.

Docker's default setting is info: log-level: info. With journald I can also use -p to set the log priority to info: journalctl -p info.

If my docker logging driver is journald with log priority set to info, do I even need to worry about setting log-level to info in daemon.json file?

1
Your question is not clear, can you add little bit more info?kosa
Sorry if I'm not being clear. I added some more info aboveJoey Corkey

1 Answers

0
votes

I think maybe you confused the following concepts: logs of docker daemon, logs of container(s) and logs print with journalctl command.

  1. The configuration in docker.json file impact logs of docker daemon.
  2. The logs of container(s) would be only impacted by your application configuration in that container.
  3. The command journalctl -p ONLY impact the logs showing on your screen, which means -p only do the filtering thing. No matter what level you've indicated, err or info, the logs are there already.

Hope this would be helpful.