Closed wille-io closed 4 years ago
Oh... yeah, this is because the site block doesn't have a hostname, only a port. So it can't map any particular host to a particular log. Let me see what can be done about this. Thanks for the report.
Okie, I changed it so that it will register a logger name mapping for ""
in the case of no hostname, as a kind of "default" log for that server. Should work now. I'm gonna tag beta 20.
I hope I just don't get my head wrapped around v2 or the documentation is incomplete, but: Telling caddy to write logs to a file does not create a file but logs to stdout.
I used caddy2_beta19_linux_amd64 from the releases page.
Caddyfile:
Started with:
caddy2_beta19_linux_amd64 run
The resulting json, curled from /config/:
Visiting 127.0.0.1:8000 generates a log entry on the console:
But:
tail -f /home/wille/test.log
tail: cannot open '/home/wille/test.log' for reading: No such file or directory
Did I miss something?