Skip to content

Instantly share code, notes, and snippets.

@bobmagicii
Created July 26, 2012 06:35
Show Gist options
  • Save bobmagicii/3180599 to your computer and use it in GitHub Desktop.
Save bobmagicii/3180599 to your computer and use it in GitHub Desktop.
Apache log in JSON format...
LogFormat "{ \"Time\":%{%s}t, \"RemoteIP\":\"%a\", \"Host\":\"%V\", \"Port\":\"%p\", \"Request\":\"%U\", \"Query\":\"%q\", \"File\":\"%f\", \"Method\":\"%m\", \"Status\":\"%s\", \"UserAgent\":\"%{User-agent}i\", \"Referer\":\"%{Referer}i\" }" jsonlog
CustomLog "/var/log/apache2/access-json.log" jsonlog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment