/var/log/nginx/*.log {
    compress
    copytruncate
    create 0640 www-data adm
    daily
    dateext
    missingok
    notifempty
    rotate ${node.metadata.get('nginx/log_retention_days', 7)}
    sharedscripts
    prerotate
        if [ -d /etc/logrotate.d/httpd-prerotate ]; then \
            run-parts /etc/logrotate.d/httpd-prerotate; \
        fi
    endscript
}

/var/log/nginx-timing/*.log {
    compress
    copytruncate
    create 0644 www-data adm
    dateext
    missingok
    notifempty
    rotate 3
    sharedscripts
    size 1M
}
