commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Murdoch" <adammurd...@apache.org>
Subject Re: [VFS] The switch to commons logging.
Date Wed, 21 Aug 2002 14:38:04 GMT

----- Original Message -----
From: "Brian Olsen" <brian@mmmanager.org>
To: "Jakarta Commons Developers List" <commons-dev@jakarta.apache.org>
Sent: Wednesday, August 21, 2002 11:23 PM
Subject: Re: [VFS] The switch to commons logging.


> ----- Original Message -----
> From: "James Strachan" <james_strachan@yahoo.co.uk>
> To: "Jakarta Commons Developers List" <commons-dev@jakarta.apache.org>
> Sent: Wednesday, August 21, 2002 2:16 PM
> Subject: Re: [VFS] The switch to commons logging.
>
>
> > > But can I configure commons logger so that each instance of
> > FileSystemManager has a different logger and all FileSystems and
FileObjects
> > created using that
> > > FileSystemManager use that same logger???
> >
> > Sure. Log from commons-logging is just an interface, it can have any
> > implementation and come from anywhere. Its very similar to the logging
> > facade inside Avalon Framework.
>
> What I was missing in commons logging was something similar to the
AbstractLogEnabled class of avalon logger as a way of giving a logger and
for the class to retrive the logger.
> In commons logging it seams that the way to get a Log instace was using
static methods on LogFactory.
> They don't directly support the form of handing an instace the logger, you
have to implement this yourself.

This is what I've ended up doing.  Should now be possible to construct a
bunch of FileSystemManager instances, each with a different logger, and have
the logger propagate down to the providers and file systems.  By default,
the FileSystemManager uses whatever LogFactory happens to return.



--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message