1. Caddy version (caddy version
):
v2.3.0
2. How I run Caddy:
I want to run Caddy as a sidecar container to Hugo
a. System environment:
Docker
b. Command:
caddy run --config /config/caddy-conf
d. My complete Caddyfile or JSON config:
{
"logging": {
"log": {
"output": "file",
"filename": "access.log",
"roll_size_mb": 20,
"level": "DEBUG"
}
}
}
3. The problem I’m having:
I want to run Caddy mainly as a log emitter, so I’ve been experimenting with configs (one of the examples is above, but I also tried some other options). However, I feel like documentation is not too clear on that and I keep running into different error messages regarding the parsing of my config. Maybe it’s a bit of a noob question, and I’m sorry if it is, but I’m desperate. My goal is only to get logs from a site served by Hugo. I’ve had experience with Nginx as a sidecar container before but wanted to try out Caddy. The goal is: get access logs as pages visited, searches performed, maybe load time of pages (if possible), so mostly around the usage of the site. Thank you in advance.
4. Error messages and/or full log output:
run: loading initial config: loading new config: json: unknown field "log"
5. What I already tried:
I’ve seen some other options like
{
log {
level debug
}
}
just debug and some other replacement and playing around with spacing, newlines, format, etc.