Newrelic/Logstash and Yii2 log grok

Just documenting for others:

If you use a log management solution like Newrelic/Logstash that uses grok, this works well for parsing out the logs:

^%{TIMESTAMP_ISO8601:timestamp} \[%{DATA:ipAddress}\]\[%{DATA:userID}\]\[%{DATA:sessionID}\]\[%{DATA:severityLevel}\]\[%{DATA:component}\] \[%{DATA:pid}\] %{DATA:message}$
1 Like