A logging level sets how much diagnostic information an application records. A minimum setting may show only errors, while a more detailed setting emits debug lines useful for investigation. section 15.6 section 6.3
Apply a logging level through the configuration path used by the application:
- Override the packaged configuration with a host directory mounted into the container, preferably read-only when the application only needs to read it. section 6.3
- In Kubernetes, inject the logging configuration into the expected container path and check whether existing Pods reload it; recreate the Pods if they do not. section 15.6
- Balance diagnostic value against storage by producing verbose logs but filtering records before they reach long-term storage. section 19.4
Detailed container logs
Mount a local configuration directory at /app/config with Docker. The application loads its logging configuration and produces debug lines that do not appear with the standard configuration. section 6.3
cd ./ch06/exercises/todo-list # save the source path as a variable - on Windows: $source="$(pwd)\config"; $target="c:\app\config" # OR on Linux source="$(pwd)/config" && target='/app/config' # run the container using the mount: docker container run --name todo-configured -d -p 8013:8080 ` --mount "type=bind,source=$source,target=$target,readonly" ` diamol/ch06-todo-list:2e # check the application: curl -s http:/./localhost:8013 # and the container logs: docker container logs todo-configured
Use the platform-specific Docker command to mount the local configuration directory at /app/config as read-only, then inspect the application logs. section 6.3








