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

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -