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.
精彩评论