Hi Praminda,

The problem is that the above is not working when it is applied to the
Gateway. For others, it works. It seems like the pattern is hardcoded in
the Gateway somehow. I'm looking for a way to update it, to perhaps find
out whether it is hardcoded and if yes, where and likewise.

Thanks,
Regards,

On Wed, Feb 21, 2018 at 9:29 AM, Praminda Jayawardana <[email protected]>
wrote:

> 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?
>>
>
> Are you referring the access logs for API requests coming into gateway?
> You need to use to follow [1] to enable access logs for passthrough
> requests but configurations you can make to pattern field is very limited
> here.
>
> [1]: https://docs.wso2.com/display/ESB490/Access+Logs
>
> On Tue, Feb 20, 2018 at 1:37 PM, Sachithra Dangalla <[email protected]>
> wrote:
>
>> 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>
>>
>
>
>
> --
>
> *Praminda Jayawardana*
> Software Engineer
> WSO2 Inc.; http://wso2.com
> Mobile : +94 (0) 716 590918 <+94%2071%20659%200918>
>



-- 

*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