This is my log:
68.192.186.96 - - [18/May/2015:12:54:42 +0000] GET http://test.com/sectionId/592/apiVersion/2/type/json HTTP/1.1 200 575 \"-\" \"Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.152 Safari/537.36\" \"icon_seq=0; PHPSESSID=frmnhfrrc25ullikbv71thc283\"
this is my pattern
%{IPORHOST:remoteip} \- \- \[%{HTTPDATE:timestamp}\] %{WORD:verb} %{NOTSPACE:request} HTTP/%{NUMBER:httpversion} %{NUMBER:status} %{NUMBER:requestNum} \"\-\" %{QUOTEDSTRING:agent}
When I check it's giving me problems with the backslashes in the log. How can I escape them? thanks!
You escape a backslash with a backslash.
\\
matches\
Also, when it comes to escaping hyphens, check out this answer.