----- Original Message ----- From: "Peter Donald" <[EMAIL PROTECTED]> To: "Avalon Development" <[email protected]> Sent: Saturday, June 30, 2001 2:04 AM Subject: Re: LogKit question!
> On Sat, 30 Jun 2001 13:33, Mircea Toma wrote: > > I want to use LogKit to do logging in a J2EE application and in order to > > access consistently my components I want to mount the Logger in the JNDI > > tree. I have an object that implements javax.naming.Referenceable that > > contains the information about how to configure the Logger and a > > javax.naming.spi.ObjectFactory that will create the Logger/-s when a lookup > > is done. My question is: should I create a new Logger each time in the > > ObjectFactory or should I pass the same Logger instance? > > Well I guess it depends ;) The way I like to set it up is that for every > separate "application" I have a separate Hierarchy object. And then for each > relevent subsytem in application I create a new Logger. > > This way I can easily manage all the logging for one application easily. It > also means that if I am debuging a certain subsystem (say the persistence > subsystem) then I can turn up the debugging so all messages are passed > through for that subsystem but not others. > > So each subsystem is a different category and each application is a different > Hierarchy is my recomendation ;) Note that this will not always work if you > are using a distributed application. > > Cheers, > > Pete Yes, I'm using a distributed application but the Logger will be local on each app. server instance and will send logging events to a distributed JMS queue. Thanks, Mircea > > *-----------------------------------------------------* > | "Faced with the choice between changing one's mind, | > | and proving that there is no need to do so - almost | > | everyone gets busy on the proof." | > | - John Kenneth Galbraith | > *-----------------------------------------------------* > > --------------------------------------------------------------------- > 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]
