Hi all,

I was trying to update the log pattern in http access logs in a distributed
APIM by modifying the catalina-server.xml as follows.

Change pattern in the following:

<Valve className="org.apache.catalina.valves.AccessLogValve"
directory="${carbon.home}/repository/logs"
                       prefix="http_access_" suffix=".log"
                       pattern="combined"/>


To:


<Valve className="org.apache.catalina.valves.AccessLogValve" directory=
"${carbon.home}/repository/logs" prefix="http_access_" suffix=".log"
pattern="%h %l %u %r %s %b %{Referer}i %{User-Agent}i %{y/M/d - H:m:s:S}t
%T"/>

In the above pattern, %{format}t represents the timestamp with milliseconds
and %T represents the time it took to process the request.

The pattern worked for all the nodes except for Gateway in which the
default logging pattern was not affected by the pattern change. Is there a
way to change the log pattern for Gateway to add the timestamp and duration?

Thanks,
Kind regards,

-- 

*Sachithra Dangalla*
Software Engineer | WSO2
Mobile : +94 71 3700 656 <%2B%2094%2071%203700656>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to