logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vijay <acces...@gmail.com>
Subject Re: Logger.getRootLogger() ?? is't static with respect to the JVM ?
Date Mon, 11 Dec 2006 23:12:39 GMT
>  >What i would do in CustomSocket.java, is instantiate an object of Logger
>  >through  Logger.getLogger(this.getClass()), and logs  my messages
>  >normally. Then the application that  uses CustomSocket has to configure
>  >the logger (apender, Level ,....etc). How do I achive this. Please note
>  >that I am only newbie, and I am not looking to use configuration files.
>  >Just doing very basic configuration.
>  >If you need any more info about this problem, just please let me know, I
>  >'ve included what I think is relevant.
> 

This problem looks similar to mine.
I have tried to do this by overriding the RootLogger.
In my case, I have two applications which used the Same core.jar.
Each of the applications had to write to their respective log files.
during the application init, we override the RootLogger
by adding this 

rootLogger.addAppender(appSpecificAppender);

This has worked for me.
I would appreciate if someone can correct me in handling this problem.

Thanks 
Vj





---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message