You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by Curt Arnold <ca...@apache.org> on 2007/01/30 18:37:09 UTC

svn commit: r500161 - in logging/log4j/trunk Bug 13099 (replacing blocked commit message)

r500161 | eross | 2007-01-26 01:19:58 -0600 (Fri, 26 Jan 2007) | 1 line

Bug 13099 - Be able to configure [Category|Logger]Factory


Index: tests/src/java/org/apache/log4j/xml/LoggerFactoryTest.java
===================================================================
0a1,45
 > package org.apache.log4j.xml;
 >
 > import org.apache.log4j.LogManager;
 > import org.apache.log4j.Logger;
 > import org.apache.log4j.joran.JoranConfigurator;
 > import org.apache.log4j.spi.LoggerFactory;
 >
 > import junit.framework.TestCase;
 >
 > public class LoggerFactoryTest extends TestCase {
 >
 >   static boolean pass = false;
 >
 >   public static class Factory implements LoggerFactory {
 >
 >     public Logger makeNewLoggerInstance(String name) {
 >       pass = true;
 >       return new MyLogger(name);
 >     }
 >
 >   }
 >
 >   public static class MyLogger extends Logger {
 >
 >     protected MyLogger(String name) {
 >       super(name);
 >     }
 >
 >   }
 >
 >   public void testSelectLogFactory()
 >   {
 >     JoranConfigurator jc = new JoranConfigurator();
 >     jc.doConfigure("input/xml/loggerFactory1.xml",  
LogManager.getLoggerRepository());
 >     Logger l = Logger.getLogger("x");
 >     assertEquals(MyLogger.class, l.getClass());
 >     assertEquals(true, pass);
 >     pass = false;
 >
 >     jc.doConfigure("input/xml/loggerFactory2.xml",  
LogManager.getLoggerRepository());
 >     Logger.getLogger("xy");
 >     assertEquals(true, pass);
 >   }
 >
 > }


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


Re: svn commit: r500161 - in logging/log4j/trunk Bug 13099 (replacing blocked commit message)

Posted by Curt Arnold <ca...@apache.org>.
There is the missing test file, but I'm not sure if it is actually  
run by the tests/build.xml.

Also, any added file should conform to the Apache Source Header and  
Copyright Notice Policy (http://www.apache.org/legal/src- 
headers.html).  Would also include the input configuration files.   
There is a bug to do a global change before the next release to bring  
the source into conformance with the new policy, but new stuff going  
in should conform to the policy from the start.




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