<html><head></head><body><div style="font-family: Verdana;font-size: 12.0px;"><div style="font-family: Verdana;font-size: 12.0px;">
<div>
<div style="font-family: Verdana;font-size: 12.0px;line-height: normal;">Dear All, </div>

<div style="font-family: Verdana;font-size: 12.0px;line-height: normal;"> </div>

<div style="font-family: Verdana;font-size: 12.0px;line-height: normal;">I am trying to configure logback-access for tomcat to be able</div>

<div style="font-family: Verdana;font-size: 12.0px;line-height: normal;">to log out http requests and responses including the payloads.</div>

<div style="font-family: Verdana;font-size: 12.0px;line-height: normal;"> </div>

<div style="font-family: Verdana;font-size: 12.0px;line-height: normal;">I tried including</div>

<div style="font-family: Verdana;font-size: 12.0px;line-height: normal;"> </div>

<div style="font-family: Verdana;font-size: 12.0px;line-height: normal;"><span style="line-height: 1.6em;"><filter> </span></div>

<div style="font-family: Verdana;font-size: 12.0px;line-height: normal;"><span style="line-height: 1.6em;"><filter-name>TeeFilter</filter-name> </span></div>

<div style="font-family: Verdana;font-size: 12.0px;line-height: normal;"><span style="line-height: 1.6em;"><filter-class>ch.qos.logback.access.servlet.TeeFilter</filter-class> </span></div>

<div style="font-family: Verdana;font-size: 12.0px;line-height: normal;"><span style="line-height: 1.6em;"></filter></span></div>

<div style="font-family: Verdana;font-size: 12.0px;line-height: normal;"><span style="line-height: 1.6em;"><filter-mapping> </span></div>

<div style="font-family: Verdana;font-size: 12.0px;line-height: normal;"><span style="line-height: 1.6em;"><filter-name>TeeFilter</span></div>

<div style="font-family: Verdana;font-size: 12.0px;line-height: normal;"><span style="line-height: 1.6em;"></filter-name> </span></div>

<div style="font-family: Verdana;font-size: 12.0px;line-height: normal;"><span style="line-height: 1.6em;"><url-pattern>/*</url-pattern> </span></div>

<div style="font-family: Verdana;font-size: 12.0px;line-height: normal;"><span style="line-height: 1.6em;"></filter-mapping></span></div>

<div style="font-family: Verdana;font-size: 12.0px;line-height: normal;"> </div>

<div style="font-family: Verdana;font-size: 12.0px;line-height: normal;"><span style="line-height: 1.6em;">in web.xml as suggested under </span><a href="https://3c.gmx.net/mail/client/dereferrer?redirectUrl=http%3A%2F%2Flogback.qos.ch%2Frecipes%2FcaptureHttp.html" target="_blank">http://logback.qos.ch/recipes/captureHttp.html</a></div>

<div style="font-family: Verdana;font-size: 12.0px;line-height: normal;"> </div>

<div style="font-family: Verdana;font-size: 12.0px;line-height: normal;">The logging works as expected, however, I would like to be able to switch logging on and off</div>

<div style="font-family: Verdana;font-size: 12.0px;line-height: normal;">from outside of the application. As far as I see changing 'includes' and 'excludes' init-params (as suggested under</div>

<div style="font-family: Verdana;font-size: 12.0px;line-height: normal;">the above link) is only possible be recreating the application war file as those would be in web.xml.</div>

<div style="font-family: Verdana;font-size: 12.0px;line-height: normal;"> </div>

<div style="font-family: Verdana;font-size: 12.0px;line-height: normal;">Is there any way to use the TeeFilter and activate/deactivate it without repackaging the application?</div>

<div style="font-family: Verdana;font-size: 12.0px;line-height: normal;"> </div>

<div style="font-family: Verdana;font-size: 12.0px;line-height: normal;">I tried moving the filter configuration from web.xml to logback-access.xml. However, in this</div>

<div style="font-family: Verdana;font-size: 12.0px;line-height: normal;">configuration, the request/response payloads are not output in the log.</div>

<div style="font-family: Verdana;font-size: 12.0px;line-height: normal;"> </div>

<div style="font-family: Verdana;font-size: 12.0px;line-height: normal;">thanks a lot in advance.</div>

<div style="font-family: Verdana;font-size: 12.0px;line-height: normal;">Best Regards, Roman</div>
</div>
</div></div></body></html>