1. Caddy version (caddy version
):
v2.4.6
2. How I run Caddy:
Windows executable on a Windows Server run by Task Scheduler
a. System environment:
Windows Server 2012
b. Command:
caddy.exe run
d. My complete Caddyfile or JSON config:
http://localhost:80 {
redir * https://{host}{uri}
log {
output file caddy2_http_access_common.log {
roll_size 10mb
roll_keep 100
roll_keep_for 336h
}
format single_field common_log
}
log {
output file caddy2_http_access_json.log {
roll_size 10mb
roll_keep 100
roll_keep_for 336h
}
format filter {
wrap json
fields {
request>headers>Cookie delete
resp_headers>Set-Cookie delete
}
}
}
}
3. The problem I’m having:
I want to have two log files, but I only get one (the second/json one).
4. Error messages and/or full log output:
none
5. What I already tried:
http://localhost:80 {
redir * https://{host}{uri}
log {
output file caddy2_http_access_common.log {
roll_size 10mb
roll_keep 100
roll_keep_for 336h
}
format single_field common_log
output file caddy2_http_access_json.log {
roll_size 10mb
roll_keep 100
roll_keep_for 336h
}
format filter {
wrap json
fields {
request>headers>Cookie delete
resp_headers>Set-Cookie delete
}
}
}
}
Documentation says “The log
directive applies to the host/port of the site block it appears in”.
If I understand this correctly, there can only be one log directive per host/port and thus only one logfile?
Is there a way I can have two?