java - Logback - dynamic configuration -
is possible configure logback in such way custom logback property :
<configuration scan="true" scanperiod="60 seconds"> <property name="logfullmessage" value="false" /> <!-- project appenders defitions --> <!-- project loggers defititions --> </configuration>
will influence pattern or appender used ? have web services application operates large requests/responses, default not wish log request/response body, when problem occurs have option switch on (logfullmessage=true) , store full response body log file.
to switch used appender (only relevant lines shown):
<property name="use_appender" value="file1" /> <appender name="file1" class="ch.qos.logback.core.fileappender"> .... </appender> <appender name="file2" class="ch.qos.logback.core.fileappender"> .... </appender> <root level="warn"> <appender-ref ref="${use_appender}"/> </root>
this in combination rescan options have enabled makes possible switch appenders.
Comments
Post a Comment