Add proxy info in caddy log

Hi, I come into a question that how to make access log more detailed? That’s to say if a request is passed to one proxy upstream, I want to show not only common info which I mean ‘time, uri, method, status_code …’ but also proxy info (for example which upstream) in access log. Any suggestions?

Hi there, welcome. You are probably looking for the {upstream} placeholder that the proxy directive makes. You can define a custom log format that uses this placeholder to know which proxy upstream the request was sent to.

Oh, that’s true. Thank you for your reply!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.