# Query log maintains an open file descriptor and must reopen after rotation.
# Audit events open the file by path on every append and require no reopen.
# Application diagnostics go to the systemd journal (not a file).
/var/log/easydns/query.log /var/log/easydns/audit.log {
    daily
    rotate 7
    missingok
    notifempty
    compress
    delaycompress
    create 0640 easydns easydns
    su easydns easydns
    sharedscripts
    postrotate
        if command -v /usr/bin/easydns >/dev/null 2>&1; then
            /usr/bin/easydns --config /etc/easydns/config.yaml logging query reopen >/dev/null 2>&1 || true
        fi
    endscript
}
