you can use grok to covert to JSON  that is  how i have done it

On Wed, May 25, 2016 at 9:03 PM, Abhijit Das <abhij...@icloud.com> wrote:

> I am wanting to change the access logging format to JSON (for easier
> parsing with logstash)
>
> I currently have the following config in my server.xml … How would i
> change this to JSON formatted?
>
>                   <Valve
> className="org.apache.catalina.valves.RemoteIpValve"
>                     internalProxies="1\.1\.1\.1"
>                     trustedProxies="1\.1\.1\.1"
>                     remoteIpHeader="X-Forwarded-For"
>                     proxiesHeader="x-forwarded-by"
>                     requestAttributesEnabled="true"/>
>
>                   <Valve
> className="org.apache.catalina.valves.AccessLogValve"
>                     directory="logs"
>                     prefix="localhost_access_log"
>                     suffix=".txt"
>                     pattern="%t %h %{X-AUSERNAME}o %{Referer}i %l %S
> %{User-Agent}i %U %s %r %q %A %v %p %b %I %D"
>                     requestAttributesEnabled="true"
>                     resolveHosts="false"/>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
>
>

Reply via email to