----- Original Message ----- From: "David BERNARD" <[EMAIL PROTECTED]> To: "Avalon Development" <[email protected]> Sent: Wednesday, August 08, 2001 6:40 PM Subject: Re: JDK1.4 logging vs. LogKit
> Hi Everyone, > > I'm newby in Avalon and C�, and I've got a suggestion (if stupid say > it). > > Actually I do a evaluation for "services engine"for my client, and I've > promote Avalon. > The first set of services is for the migration of a old big java > application. This application have some target in services management, > log... > > In the first step, we design a from scratch system, and the choice for > log is : "log is a service like anyother". No quite.... the logging is a fundamental part that should be available immediately, it means that a Hierarchy has to be instantiated in the container. >So why, it's not a nice/good > idea to define a role Logger and use a LoggerSelector (use category > string as key) to get the instance of Logger. > In this case, there implementation for LogKit, Log4J... and the > configuration of Log system is independent of each Component > configuration (The default category a component can use is the ROLE > constant). > The problem is all Loggeable must be Composable to access > LoggerSelector. I already did that in the project I work and I can tell you it's not the best approach. I think you can have only LogTarget-s as components configured to use a certain Hierarchy ( we have two Hierarchies for logging and auditing). In this way you can have a configured LogTargetComponent like: FileTargetComponent, DatabaseTargetComponent, JMSQueueTargetComponent ..... and you would configure them to with a certain Hierarchy, Category and Priority as common attributes. Mircea > > In this case Configurator/and dynamic Reconfiguration can be develop and > specialize like any Service. > > I will try this in my evaluation. If it's OK, then I could give my first > version. > > PS: Sorry for my english. > > > On Wed, 8 Aug 2001, Leo Sutic wrote: > > > > > Peter, Berin, > > > > > > how will this work with individual log levels for each > > > logger/category/channel? > > > > > > If one adds two properties: logger and loglevel, like this: > > > > > > <component role="com.foo.Component" > > > class="com.foo.DefaultComponent" > > > logger="foo" > > > loglevel="DEBUG"/> > > > > > > Is there a problem when having multiple components using the same logger? > > > > > > <component role="com.foo.Component" > > > class="com.foo.DefaultComponent" > > > logger="foo" > > > loglevel="DEBUG"/> > > > > > > <component role="com.foo.Component2" > > > class="com.foo.DefaultComponent2" > > > logger="foo" > > > loglevel="ERROR"/> > > > > I don't really like specifying the LOGLEVEL in the > > component configuration. I think this is something that has to be > > specified at the class instantiating the loggers. Do you see yourself > > changing all loglevels in the config file when you deploy it for > > production? > > > > Giacomo > > > > > > > > If the two components share the same logger instance, I don't see how this > > > can work. Of course, the fact that I have no idea of how the contract for > > > getChildLogger is in respect to multiple children with the same subcategory. > > > > > > /LS > > > > > > > -----Original Message----- > > > > From: Peter Donald [mailto:[EMAIL PROTECTED] > > > > Sent: den 8 augusti 2001 15:22 > > > > To: Avalon Development > > > > Subject: Re: JDK1.4 logging vs. LogKit > > > > > > > > > > > > On Wed, 8 Aug 2001 22:42, Berin Loritsch wrote: > > > > > Peter Donald wrote: > > > > > > Hi, > > > > > > > > > > > > On Wed, 8 Aug 2001 06:10, giacomo wrote: > > > > > >>I have to confess that I don't know how this works in all my > > > > components > > > > > >>that are based on AbstractLoggable and have the logger passed in from > > > > > >>ExcaliburCM. > > > > > > > > > > > > Just looked at ExcaliburCM and it doesn't really support > > > > separate loggers > > > > > > per component. Berin what do you think of adding an extra attribute to > > > > > > component definition so that you can specify name of logger. > > > > Then later > > > > > > on instead of doing > > > > > > > > > > I was thinking about that before. We need to add an attribute to the > > > > > component definitions (probably "logger"). Something like this > > > > to specify > > > > > it: > > > > > > > > > > <component role="com.foo.Component" > > > > > class="com.foo.DefaultComponent" > > > > > logger="foo"/> > > > > > > > > > > The attribute name is negotiable ;). > > > > > > > > logger works for me. > > > > > > > > > Think this will help, combined with your changes for the Logger? > > > > > > > > Which changes are you referring to? It should work without any changes. > > > > > > -- > -------------------------------------------------------------- > David "Dwayne" Bernard Freelance Developer (Java) > mailto:[EMAIL PROTECTED] > \|/ http://dwayne.java-fan.com > --o0O @.@ O0o------------------------------------------------- > > --------------------------------------------------------------------- > 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]
