-
Feature Request
-
Resolution: Unresolved
-
Normal
-
None
-
2.6
-
None
-
False
-
-
False
- What is the nature and description of the request?
> Add a feature to redirect Containerized installation logs in to the file. User want to capture logs of specific containers in file to be used with the logging tool. - Why does the customer need this? (List the business requirements here)
> User wants to capture logs in a file and use that file for external logging tool. - How would you like to achieve this? (List the functional requirements here)
> Need an option to capute the logs in container specific files. For example, If I want to capture the `automation-hub-api` logs, I'll configure path something similar to `/var/log/pods/automation-hub/automation-hub-api.log'
Additional Info
I tried setting the log_driver and log_path in global configuration as follows but its not working.
# vi /etc/containers/containers.conf --- [engine] runtime = "crun" [containers] log_driver = "k8s-file" log_path = "/var/log/pods"
Then I restarted all the pods, but podman inspect still isn't showing the correct path.
`# podman inspect automation-controller-task" still shows journald as the log.`
"LogConfig": { "Type": "journald", "Config": null, "Path": "", "Tag": "", "Size": "0B"
But podman info is showing the correct logdriver
$ podman info | grep -i log eventLogger: journald logDriver: k8s-file log:
I also tried in $HOME/.config/containers/containers.conf but no luck
#cat $HOME/.config/containers/containers.conf --- [engine] runtime = "crun" [containers] log_driver = "k8s-file" log_path = "/var/log/pods/automation-hub/automation-hub-api.log" $ podman info | grep -i log eventLogger: journald logDriver: k8s-file log: