Change log format to JSON
This commit is contained in:
parent
a6fa94f239
commit
b31a26b445
|
@ -10,8 +10,10 @@ StartServers 10
|
|||
MaxRequestWorkers 10
|
||||
MaxConnectionsPerChild 1000
|
||||
|
||||
# Logging configuration.
|
||||
LogFormat "%t %h %{Host}i %l %u \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" dreamwidth
|
||||
# Logging configuration. JSON format for cloudwatch.
|
||||
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\"}" dreamwidth
|
||||
|
||||
# Don't log OPTIONS requests to the main log
|
||||
SetEnvIf REQUEST_METHOD OPTIONS optionsreq
|
||||
CustomLog /var/log/apache2/dreamwidth_access.log dreamwidth env=!optionsreq
|
||||
CustomLog /var/log/apache2/dreamwidth_options.log dreamwidth env=optionsreq
|
||||
|
|
Loading…
Reference in New Issue