开发者

Log4j - log file per package

开发者 https://www.devze.com 2023-02-04 22:08 出处:网络
I am using log4j and I cant figure out, how to create log file for specific classes (in my case for security messages).

I am using log4j and I cant figure out, how to create log file for specific classes (in my case for security messages).

I want to have one global log, where I will log everything (INFO), and some package specific log files for debugging, testing and security of some parts of my app.

For instance I want to log only events from LoggerListener (Spring security) to file security.log, and only messages from my apps package cz.flexibla2 *to flexibla2.log* etc.

Th开发者_开发问答anks for your help.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号