# {{ ansible_managed }} # # Project Zomboid's server console, which is a single ever-growing file. This is # separate from the container's stdout, which podman rotates itself via the # k8s-file driver's max_size. # # Scope is deliberately just this file. PZ's other logs live in dated # directories under Logs/ that grow in file *count*, not file size, so nothing # there ever crosses a rotation threshold -- those are pruned by age instead, # via zomboid-log-prune.timer. # # copytruncate is mandatory here: the server holds these fds open for the whole # life of the process, so a rename would leave it writing into an unlinked # inode and the file would appear to simply stop growing. # # The Discord bot tails server-console.txt from a byte offset and resets that # offset when the file shrinks, so a truncate under it is safe. {{ zomboid_path }}/data/server-console.txt { # size, not a time directive: logrotate's daily timer is when this is # *checked*, 100M is when it actually rotates. Specifying both makes # logrotate warn that size overrides daily. copytruncate size 100M rotate 3 compress delaycompress missingok notifempty }