开发者

Configuring log4j for a specific user

Hi I am using log4j in my J2EE application, I have a scenario of enabling logging details of a particular user and write his log details in separate file.

Is there any way to implement this.

any help will be appreciated
开发者_运维问答


There are ways, but you can't do it by configuration.

You need to write your own appender extending an existing Appender class (for example FileAppender or RollingFileAppender) and to override at least "public void activateOptions()" to set the file according to the current user.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜