Skip to content

Instantly share code, notes, and snippets.

@simonclausen
Last active March 12, 2020 20:43
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simonclausen/5d42edb199b01c68f4aa4d460bf3588b to your computer and use it in GitHub Desktop.
Save simonclausen/5d42edb199b01c68f4aa4d460bf3588b to your computer and use it in GitHub Desktop.
Caddy log format for JSON
log / stdout "\{\"hostname\":\"{host}\",\"remote\":\"{remote}\",\"user\":\"{user}\",\"when_iso\":\"{when_iso}\",\"method\":\"{method}\",\"host\":\"{host}\",\"uri\":\"{uri}\",\"proto\":\"{proto}\",\"status\":\"{status}\",\"size\":\"{size}\",\"query\":\"{query}\",\"mitm\":\"{mitm}\",\"latency_ms\":\"{latency_ms}\",\"tls_cipher\":\"{tls_cipher}\",\"tls_version\":\"{tls_version}\",\"scheme\":\"{scheme}\",\"referer\":\"{>Referer}\",\"user_agent\":\"{>User-Agent}\",\"fragment\":\"{fragment}\"\}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment