I realized that the Hierarchy initially consists of Logger instances as read from the Configurator. During test run loggers where added to the Hierarchy using MyLoggerFactory => MyLogger instances. But the original loggers remain Logger instances. I HAVE TO use the class attribute on each logger like this <logger name="com.my.test" class="com.my.test.MyLogger" > if not, the (default) Logger class will always be instanciated.
/Geir > -----Original Message----- > From: Geir Antonsen > Sent: 4. juni 2003 13:47 > To: [EMAIL PROTECTED] > Subject: How Logger instanciation and LoggerRepository are related > > > I'm writing my own Configurator (based on the > DOMConfigurator) and my own Logger and LoggerFactory to > obtain centralized logging in a J2EE environment (by means of > JMS/MDB). > This activity has emerged some questions about how the > LoggerRepository hierarchy are configured. > > When instantiating Logger I use my own MyLoggerFactory which > gives me a MyLogger. > But if you ommit declaring class attribute of <logger> then > Logger is default loaded. > The same default Logger is loaded even if you add a > <categoryFactory> element in the property file. > But it always MyLogger that is used. How come? > > Regards > > Geir Antonsen > Consultant/developer > http://www.morecom.no > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
