2025-04-01, 06:33 PM
(This post was last modified: 2025-04-01, 06:35 PM by TheDreadPirate. Edited 1 time in total.)
I was never able to figure that out. Instead of fighting with logging.json I opted to just symlink log_YYYYMMDD.log to jellyfin.log and at midnight a cron recreates the jellyfin.log symlink for the newly created log. fail2ban complains a bit about there being logs it hasn't seen during the symlink transition, but it still reads them in and follows the new symlink.
The cronjob calls a script with the following contents.
The script is located in /usr/sbin and is called as follows from root's crontab.
The cronjob calls a script with the following contents.
Code:
#!/bin/bash
DATE=$(date +'%Y%m%d')
rm /docker/containers/jellyfin-prod-data/config/log/jellyfin.log
ln -s log_${DATE}.log /docker/containers/jellyfin-prod-data/config/log/jellyfin.log
The script is located in /usr/sbin and is called as follows from root's crontab.
Code:
# m h dom mon dow command
1 0 * * * rotateJellyfinLog