Replies: 2 comments 3 replies
-
This option is available in podman and it works, it's just not documented for some reason. |
Beta Was this translation helpful? Give feedback.
-
I tested the following command:
In this setup, even though I specified --log-opt max-files=5, it seems that the k8s-file driver ignores this option, only utilizing max-size. Therefore, I lose the ability to manage the number of log files created, which can lead to issues with log storage management. Introducing the max-file option would be highly beneficial, as it would allow us to maintain a more organized log history by automatically removing the oldest log files when the limit is reached. I look forward to your insights on this matter. Thank you! |
Beta Was this translation helpful? Give feedback.
-
In the current version of Podman, the only option available for configuring log files size is the "max-size," which sets the maximum size of the log file. However, a limitation arises when the file is rotated, as only the latest traces are accessible, and the complete history is lost.
To address this issue, it would be highly beneficial to introduce a "max-file" option within the logging driver specific options. This option would allow users to specify the maximum number of log files that can coexist. In the event of log rotation creating surplus files, the oldest file would be automatically removed.
For instance, if the user sets "--log-opt max-file=3," Podman would generate a maximum of three files to store the current log information. Each file would adhere to the specified maximum size set by "--log-opt max-size," ensuring a more comprehensive and organized log history.
Example:
traces.log, (current file)
traces.log.1,
traces.log.2
traces.log.3
Beta Was this translation helpful? Give feedback.
All reactions