1. My Caddy version (caddy version
):
v2.0.0-rc.3
2. How I run Caddy:
a. System environment:
Linux Debian Buster
d. My complete Caddyfile or JSON config:
gaubert:80 {
root * /var/www
file_server
import common.conf
}
# common.conf
php_fastcgi unix//var/run/php/php7.3-fpm.sock
encode gzip
log {
output file /var/log/caddy/access.log
# format single_field common_log
}
3. The problem I’m having:
Note really a problem, but questions:
-
with the log config above, caddy is still replicating the very same log message in syslog. A bit redundant.
-
Also, when trying to change the format log to
format single_field common_log
user agent information does not show up. I could live with the default json output, a lot richer, but the “classical | archaic” format is much more readable when I need a quick glance to the log. Any suggestions?
If I refer to my v1 log directive it reads:
log / /var/log/caddy/access.log "{remote} {when_iso} {proto} {status} {method} \"{uri}\""{
rotate_size 50 # Rotate after 50 MB
rotate_age 90 # Keep rotated files for 90 days
rotate_keep 20 # Keep at most 20 log files
rotate_compress # Compress rotated log files in gzip format
}