Disabling log compression?

I have this in my Caddyfile for logging requests. In this setup, old log files are renamed and compressed to have a .gz extension automatically.

log {
    output file /var/log/caddy/access.log {
        roll_size 3MiB
        roll_keep 5
        roll_keep_for 5d

    format filter {
        wrap json
        fields {
            common_log delete

Is there a way I can skip compression (but still have the log files rotated)? This would allow me to simplify certain automated tasks that I run on these log files.

Yep, there’s the roll_gzip config knob for that.

1 Like

Hmm, looks like we haven’t exposed this in the Caddyfile yet. Probably the first request I’ve seen for it!

Actually, it’s been added in the master branch as the roll_uncompressed option. It’ll be in the next release!


This topic was automatically closed after 30 days. New replies are no longer allowed.