-
Logging different files with log4j (2 messages)
- Posted by: Vivek Kohli
- Posted on: October 06 2009 05:18 EDT
Hi, I am working on an ejb application which has a single jboss with many clients. All the log goes to the server.log but my target is to get different logs for different clients. Example:- 1) If a person starts the application and the application shows him different domains that he can log in to. Let the list of domains be {D1,D2,D3,D4,D5}. He logs into D1, then jboss should specifically send all the logs of that domain to a single file named as D1dd-mm-yyyy. 2) If another person at the same time logs into domain D2, then his server side logs should go to D2dd-mm-yyyy irrespective of the logs of the other domain. So my task is to separate logs based on the domains. Thanks in advance. VivekThreaded Messages (2)
- Re: Logging different files with log4j by umar ali on October 08 2009 04:31 EDT
- Re: Logging different files with log4j by Dmitry Perlroizen on November 06 2009 07:22 EST
-
Re: Logging different files with log4j[ Go to top ]
- Posted by: umar ali
- Posted on: October 08 2009 04:31 EDT
- in response to Vivek Kohli
In log4j.properties file you can use different log4j file appenders to specify different log files like log4j.appender.Login.File=logs.dir/log4j.appender.Login.File log4j.appender.Workflow.File=logs.dir/workflow.log -
Re: Logging different files with log4j[ Go to top ]
- Posted by: Dmitry Perlroizen
- Posted on: November 06 2009 07:22 EST
- in response to Vivek Kohli
We are using logFaces server to address particularly this issue. You can give names to your applications and then get focused on them either in real-time or querying the historical data. You can also use MDC for doing this..So my task is to separate logs based on the domains.