Google News
logo
Docker - Interview Questions
Can you differentiate between Daemon Logging and Container Logging?
* In docker, logging is supported at 2 levels and they are logging at the Daemon level or logging at the Container level.

* Daemon Level : This kind of logging has four levels- Debug, Info, Error, and Fatal.
- Debug has all the data that happened during the execution of the daemon process.
- Info carries all the information along with the error information during the execution of the daemon process.
- Errors have those errors that occurred during the execution of the daemon process.
- Fatal has the fatal errors that occurred during the execution.

* Container Level :
- Container level logging can be done using the command: sudo docker run –it <container_name> /bin/bash
- In order to check for the container level logs, we can run the command : sudo docker logs <container_id>
Advertisement