rocketmq icon indicating copy to clipboard operation
rocketmq copied to clipboard

[Enhancement] 建议可配置关闭tools包的日志

Open guosk123 opened this issue 1 year ago • 0 comments

Before Creating the Enhancement Request

  • [X] I have confirmed that this should be classified as an enhancement rather than a bug/feature.

Summary

建议可配置关闭tools包的日志

Motivation

项目中使用tools包,进行消费位点、topic等管理操作,会记录大量的日志在根目录,目前tools包的logback文件没有可以修改日志级别的变量:

<root level="INFO">
        <appender-ref ref="DefaultAppender"/>
 </root>

<appender name="DefaultAppender"
              class="ch.qos.logback.core.rolling.RollingFileAppender">
        <file>${user.home}${file.separator}logs${file.separator}rocketmqlogs${file.separator}tools_default.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}tools_default.%i.log.gz</fileNamePattern>
            <minIndex>1</minIndex>
            <maxIndex>5</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>

Describe the Solution You'd Like

希望增加相关的变量,可自行控制日志级别

Describe Alternatives You've Considered

日志级别可控,路径可配置,目前只能修改user.home

Additional Context

No response

guosk123 avatar May 28 '24 02:05 guosk123