The documentation for Caddy v2’s Caddyfile is found at Caddyfile Directives — Caddy Documentation
Caddy v1 and Caddy v2 configurations are not compatible, there have been many significant changes to the internal functionality of the server that required breaking changes.
Unfortunately, because it’s still in beta, Caddyfile directives for logging haven’t been implemented yet. It will probably be added in the next few releases.
For now, I if you need logs, you’ll need to use JSON config (you can dump your existing config with the caddy adapt
command as a starting point). All you have to do is set the “logs” field of the server: JSON Config Structure - Caddy Documentation. For default access logs, just set it to an empty object ( {}
).