Skip to content

Commit

Permalink
[ISSUE #8756] fix broker logback config, gzip the archive files.
Browse files Browse the repository at this point in the history
  • Loading branch information
juhuan committed Sep 26, 2024
1 parent daf3d1a commit d5a2e7a
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 13 deletions.
14 changes: 10 additions & 4 deletions broker/src/main/resources/rmq.broker.logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -508,10 +508,13 @@
<sift>
<appender name="RocketmqPopAppender"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}pop.log</file>
<file>
${user.home}${file.separator}logs${file.separator}rocketmqlogs${brokerLogDir:-${file.separator}}${brokerContainerLogDir}${file.separator}pop.log
</file>
<append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
<fileNamePattern>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}otherdays${file.separator}pop.%i.log
<fileNamePattern>
${user.home}${file.separator}logs${file.separator}rocketmqlogs${brokerLogDir:-${file.separator}}${brokerContainerLogDir}${file.separator}otherdays${file.separator}pop.%i.log.gz
</fileNamePattern>
<minIndex>1</minIndex>
<maxIndex>20</maxIndex>
Expand Down Expand Up @@ -539,10 +542,13 @@
<sift>
<appender name="RocketmqColdCtrAppender"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${user.home}/logs/rocketmqlogs/coldctr.log</file>
<file>
${user.home}${file.separator}logs${file.separator}rocketmqlogs${brokerLogDir:-${file.separator}}${brokerContainerLogDir}${file.separator}coldctr.log
</file>
<append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
<fileNamePattern>${user.home}/logs/rocketmqlogs/otherdays/coldctr.%i.log
<fileNamePattern>
${user.home}${file.separator}logs${file.separator}rocketmqlogs${brokerLogDir:-${file.separator}}${brokerContainerLogDir}${file.separator}otherdays${file.separator}coldctr.%i.log.gz
</fileNamePattern>
<minIndex>1</minIndex>
<maxIndex>10</maxIndex>
Expand Down
5 changes: 2 additions & 3 deletions proxy/src/main/resources/rmq.proxy.logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -307,11 +307,10 @@

<appender name="RocketmqPopAppender_inner"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}pop.log</file>
<file>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}${brokerLogDir:-${file.separator}}${file.separator}pop.log</file>
<append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
<fileNamePattern>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}otherdays${file.separator}pop.%i.log
</fileNamePattern>
<fileNamePattern>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}otherdays${file.separator}${brokerLogDir:-${file.separator}}${file.separator}pop.%i.log.gz</fileNamePattern>
<minIndex>1</minIndex>
<maxIndex>20</maxIndex>
</rollingPolicy>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -303,11 +303,10 @@

<appender name="RocketmqPopAppender_inner"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}pop.log</file>
<file>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}${brokerLogDir:-${file.separator}}${file.separator}pop.log</file>
<append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
<fileNamePattern>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}otherdays${file.separator}pop.%i.log
</fileNamePattern>
<fileNamePattern>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}otherdays${file.separator}${brokerLogDir:-${file.separator}}${file.separator}pop.%i.log.gz</fileNamePattern>
<minIndex>1</minIndex>
<maxIndex>20</maxIndex>
</rollingPolicy>
Expand Down
5 changes: 2 additions & 3 deletions test/src/test/resources/rmq-proxy-home/conf/logback_proxy.xml
Original file line number Diff line number Diff line change
Expand Up @@ -303,11 +303,10 @@

<appender name="RocketmqPopAppender_inner"
class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}pop.log</file>
<file>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}${brokerLogDir:-${file.separator}}${file.separator}pop.log</file>
<append>true</append>
<rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy">
<fileNamePattern>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}otherdays${file.separator}qpop.%i.log
</fileNamePattern>
<fileNamePattern>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}otherdays${file.separator}${brokerLogDir:-${file.separator}}${file.separator}pop.%i.log.gz</fileNamePattern>
<minIndex>1</minIndex>
<maxIndex>20</maxIndex>
</rollingPolicy>
Expand Down

0 comments on commit d5a2e7a

Please sign in to comment.