apache error log json code example

Example 1: apache log format json

LogFormat "{ \"time\":\"%{%Y-%m-%d}tT%{%T}t.%{msec_frac}tZ\", \"process\":\"%D\", \"filename\":\"%f\", \"remoteIP\":\"%a\", \"host\":\"%V\", \"request\":\"%U\", \"query\":\"%q\", \"method\":\"%m\", \"status\":\"%>s\", \"userAgent\":\"%{User-agent}i\", \"referer\":\"%{Referer}i\" }," combined

Example 2: apache log format json

"time": "2014-08-11T11:40:13+00:00", "remote_addr": "122.226.223.69", "remote_user": "-", "body_bytes_sent": "579", "request_time": "0.000", "status": "404", "request": "GET http://www.k2proxy.com//hello.html HTTP/1.1", "request_method": "GET", "http_referrer": "-", "http_user_agent": "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/6.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; .NET4.0E)"