Closed klboke closed 5 years ago
Thanks for your proposal. I think it is valid and helps on developing.
Two suggestions here.
log4j.rootLogger=OFF, stdout
and only turn on log locally for debugging.
see https://github.com/Tencent/TubeMQ/pull/47 discusses
I know that the log configuration under conf can be loaded by -Dlog4j.configuration, but this does not solve my problem. At first, I did this. Then I found that the configuration log under conf was not printed to the console, but was written to the specified file. I think in development mode, I don’t expect to go to the log file every time. Looking for log information, it is more desirable to see the information directly from the console, however, I want to complete this, but also a lot of effort to modify the log configuration, this is not what I want
我知道通过-Dlog4j.configuration的方式可以加载到conf下的日志配置,但是这并没解决我的问题。一开始我确实是这么做的,然后我发现conf下的配置日志都没有打印到控制台,而是写入到指定的文件了,我想在开发模式下,一定不期望每次都去日志文件中找日志信息吧,更期望的是直接从控制台中看到信息,然而,我想完成这个,还的费很大的劲去修改日志配置,这不是我想要的
Motivation 系统日志框架使用的log4j,tubemq-server模块和tubemq-example模块下都没有log4j配置,开发调试时没有打印到控制台的日志非常不方便。当然这个不影响打包后的程序日志
(optional) Design 在tubemq-server模块和tubemq-example模块下新增log4j.properties的配置文件,配置日志打印到控制台 (optional) Example snippet 如: