<br><div dir="ltr">Hi,<br>I'm using logback in application to log the http request/response into the DataBase (logging_event) table. <div>Below given is the Java configuration class for DbAppender.</div><div>In my application, I have another configuration class that has some configuration properties and the values of those properties can change dynamically. </div><div>I'm using the @RefreshScope (org.springframework.cloud.<wbr>context.config.annotation.<wbr>RefreshScope) annotation to get the new values of the config properties changed on the fly using <a href="https://www.consul.io/" target="_blank">https://www.consul.io/</a>.</div><div>The DBAppender works fine, except that when I make any changes to the configuration properties externally (changing the value of an existing property or adding a new config property in Consul) while the app is running. After I make any changes to a config property externally, the DbAppender will not insert logs into the DB table. These config properties are not related to the logging functionality.<div><br>@Configuration<br>public class LogbackConfiguration {<br><br> @Bean<br> public DBAppender dbAppender(DataSource ds){<br> DBAppender dbAppender = new DBAppender();<br> DataSourceConnectionSource connectionSource = new DataSourceConnectionSource();<br> connectionSource.<wbr>setDataSource(ds );<br> connectionSource.start();<br> dbAppender.<wbr>setConnectionSource(<wbr>connectionSource);<br> dbAppender.start();<br><br> LoggerContext loggerContext = (LoggerContext) LoggerFactory.<wbr>getILoggerFactory();<br> Logger logger = loggerContext.getLogger("org.<wbr>zalando.logbook");<br> logger.addAppender(dbAppender)<wbr>;<br> return dbAppender;<br> }<br>}<br><br>Below given is the configurations related to logging in my application.yml file - <br>logbook:<br> minimum-status: 100<br> exclude:<br> - /actuator/**<br> - /favicon.ico<br> - /swagger-resources/**<br> - /swagger-ui.html<br> - /webjars/**<br>logging:<br> level:<br> org.zalando.logbook: TRACE<br><br>Could you please guide me to identify the root cause of this issue?<br><br>Thanks<br></div></div></div>
<br>