The following configuration means not restarting the service and reloading the log configuration file after the specified time
logback.xml
<configuration scan="true" scanPeriod="30 seconds"> .... </configuration>
Configuration instructions:
scan: Set to true, which means that the log configuration file will be reloaded within the specified time
scanPeriod: When scan=true, the log configuration file will be reloaded within the specified unit time, the default is to reload once every minute.
Configuration instructions for scanPeriod:
Time unit: milliseconds, seconds, minutes, hours
eg:
5分钟: <configuration scan="true" scanPeriod="5 minutes">
1小时: <configuration scan="true" scanPeriod="1 hours">
Official website: https://logback.qos.ch/manual/configuration.html#autoScan