Open francislavoie opened 1 year ago
Hi @francislavoie
I am a big lover of Caddy, I will look at possible Caddy integration.
Hi @francislavoie
Do you have any ideas why it could be useful?
It would be cool to have an alternative pretty formatter specifically for access logs. That's something lacking in Caddy.
@francislavoie yep, good idea. Thank you.
I really like the look of this!
I was curious to see if you'd be interested in playing with this with Caddy; it seems like it would integrate nicely, since Caddy uses Zap for logging everything.
See https://caddyserver.com/docs/logging which TL;DR explains why Common Log sucks and why structured logging is what we chose for Caddy.
Caddy uses a plugin system and you can provide a logging encoder module (formatter) by implementing a module in the
caddy.logging.encoders.*
namespace. The ones that exist are listed here: https://caddyserver.com/docs/json/logging/logs/encoder/, and docs on extending Caddy here https://caddyserver.com/docs/extending-caddy