在/apache-rocketmq/conf下面,有logback_broker.xml
<appender name="DefaultAppender" class="ch.qos.logback.core.rolling.RollingFileAppender"> <!--日志位置--> <file>${user.home}/logs/rocketmqlogs/broker_default.log</file> <append>true</append> <rollingPolicy class="ch.qos.logback.core.rolling.FixedWindowRollingPolicy"> <fileNamePattern>${user.home}/logs/rocketmqlogs/otherdays/broker_default.%i.log.gz</fileNamePattern> <minIndex>1</minIndex> <maxIndex>10</maxIndex> </rollingPolicy> <triggeringPolicy class="ch.qos.logback.core.rolling.SizeBasedTriggeringPolicy"> <maxFileSize>100MB</maxFileSize> </triggeringPolicy> <encoder> <pattern>%d{yyy-MM-dd HH:mm:ss,GMT+8} %p %t - %m%n</pattern> <charset class="java.nio.charset.Charset">UTF-8</charset> </encoder> </appender>