logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject cvs commit: logging-log4j/examples/src/subclass MyLoggerTest.java
Date Wed, 26 May 2004 17:30:05 GMT
ceki        2004/05/26 10:30:05

  Modified:    examples/src/subclass MyLoggerTest.java
  Log:
  Replaced  DOMConfigrator invocation by a call to JoranConfigrator
  
  Revision  Changes    Path
  1.2       +5 -3      logging-log4j/examples/src/subclass/MyLoggerTest.java
  
  Index: MyLoggerTest.java
  ===================================================================
  RCS file: /home/cvs/logging-log4j/examples/src/subclass/MyLoggerTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- MyLoggerTest.java	15 Dec 2003 21:49:02 -0000	1.1
  +++ MyLoggerTest.java	26 May 2004 17:30:05 -0000	1.2
  @@ -8,9 +8,10 @@
   package subclass;
   
   import org.apache.log4j.*;
  -import org.apache.log4j.xml.DOMConfigurator;
  +
   import org.apache.log4j.PropertyConfigurator;
   import org.apache.log4j.helpers.LogLog;
  +import org.apache.log4j.joran.JoranConfigurator;
   
   /**
      A simple example showing logger subclassing. 
  @@ -48,9 +49,10 @@
       }
       else if(args.length == 1) {
         if(args[0].endsWith("xml")) {
  -	DOMConfigurator.configure(args[0]);
  +        JoranConfigurator jc = new JoranConfigurator();
  + 	      jc.doConfigure(args[0], LogManager.getLoggerRepository());
         } else {
  -	PropertyConfigurator.configure(args[0]);
  +	        PropertyConfigurator.configure(args[0]);
         }
       } else {
         usage("Incorrect number of parameters.");
  
  
  

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


Mime
View raw message