You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Brian Olsen <br...@mmmanager.org> on 2002/08/21 11:22:46 UTC

[VFS] The switch to commons logging.

Hey Adam,

I saw that you have switched VFS to the commons logging API and I'm not sure I'm quite comfortable with that.
The logger class itself I have no problem with it's more the way you find the logger that I don't like.

When we used LogEnabled the owner of each object was given the logger by it's parent wich meant it was up to the creator of the FileSystemManager to give a logger to it.

With the new logger, AbstractFileSystem looks up its own logger using the logfactory using its class.
This new way of retriving the logger I see as a lose of functionality because I can no longer have per instance loggers.


Why don't we use the Avalon Logger internally for the VFS and put the log initializing code in the FileSystemManagerFactory instead???


- Brian


Re: [VFS][PATCH] Jar provider

Posted by Adam Murdoch <ad...@apache.org>.
Hi,

Patch applied, thanks.

----- Original Message -----
From: "Brian Olsen" <br...@mmmanager.org>
To: "Jakarta Commons Developers List" <co...@jakarta.apache.org>
Sent: Thursday, August 22, 2002 1:38 AM
Subject: [VFS][PATCH] Jar provider


The jar provider is finally finished.
It uses the getAttribute and getCertificates methods that came with the
class loader patch but in that patch returned null.

The jar provider is the first to implement these features but there is
nothing preventing any file system from supporting features that were
previously reserved for jars.
If the file system supports file signing, or the file system supports
attributes like "Sealed" or "Specification-Title" the class loader will use
these features.

The provider does not have unit tests for signed jars at the moment, but
both class loader and jar provider should support these.

Have fun!
- Brian




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


[VFS][PATCH] Jar provider

Posted by Brian Olsen <br...@mmmanager.org>.
The jar provider is finally finished.
It uses the getAttribute and getCertificates methods that came with the class loader patch but in that patch returned null.

The jar provider is the first to implement these features but there is nothing preventing any file system from supporting features that were previously reserved for jars.
If the file system supports file signing, or the file system supports attributes like "Sealed" or "Specification-Title" the class loader will use these features.

The provider does not have unit tests for signed jars at the moment, but both class loader and jar provider should support these.

Have fun!
- Brian

Re: [VFS] The switch to commons logging.

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


> ----- Original Message -----
> From: "James Strachan" <ja...@yahoo.co.uk>
> To: "Jakarta Commons Developers List" <co...@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:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [VFS] The switch to commons logging.

Posted by Brian Olsen <br...@mmmanager.org>.
----- Original Message ----- 
From: "James Strachan" <ja...@yahoo.co.uk>
To: "Jakarta Commons Developers List" <co...@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.

Currently the code in VFS that use a logger retrives this using the LogFactory directly instead of being handed the logger from the parent.

- Brian





--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [VFS] The switch to commons logging.

Posted by James Strachan <ja...@yahoo.co.uk>.
> 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.

James
-------
http://radio.weblogs.com/0112098/
----- Original Message -----
From: "Brian Olsen" <br...@mmmanager.org>
To: "Jakarta Commons Developers List" <co...@jakarta.apache.org>
Sent: Wednesday, August 21, 2002 1:03 PM
Subject: Re: [VFS] The switch to commons logging.



----- Original Message -----
From: "James Strachan" <ja...@yahoo.co.uk>
To: "Jakarta Commons Developers List" <co...@jakarta.apache.org>
Sent: Wednesday, August 21, 2002 2:03 PM
Subject: Re: [VFS] The switch to commons logging.


> Hi Brian
>
> Just because the logging switched from using the facade in Avalon
Framework
> to using commons logging, doesn't mean we can't still configure the Log
used
> in a FileSystemManager. The parent that creates it can initialize the Log,
> such as the FileSystemManagerFactory.

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???
e.g. one instance of FileSystemManager uses Log4J, another jdk1.4 logger and
a third uses Avalon Logkit.


>
> James
> -------
> http://radio.weblogs.com/0112098/
> ----- Original Message -----
> From: "Brian Olsen" <br...@mmmanager.org>
> To: "Jakarta Commons Developers List" <co...@jakarta.apache.org>
> Sent: Wednesday, August 21, 2002 10:22 AM
> Subject: [VFS] The switch to commons logging.
>
>
> Hey Adam,
>
> I saw that you have switched VFS to the commons logging API and I'm not
sure
> I'm quite comfortable with that.
> The logger class itself I have no problem with it's more the way you find
> the logger that I don't like.
>
> When we used LogEnabled the owner of each object was given the logger by
> it's parent wich meant it was up to the creator of the FileSystemManager
to
> give a logger to it.
>
> With the new logger, AbstractFileSystem looks up its own logger using the
> logfactory using its class.
> This new way of retriving the logger I see as a lose of functionality
> because I can no longer have per instance loggers.
>
>
> Why don't we use the Avalon Logger internally for the VFS and put the log
> initializing code in the FileSystemManagerFactory instead???
>
>
> - Brian
>
>
>
> __________________________________________________
> Do You Yahoo!?
> Everything you'll ever need on one web page
> from News and Sport to Email and Music Charts
> http://uk.my.yahoo.com
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>


__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [VFS] The switch to commons logging.

Posted by Brian Olsen <br...@mmmanager.org>.
----- Original Message ----- 
From: "James Strachan" <ja...@yahoo.co.uk>
To: "Jakarta Commons Developers List" <co...@jakarta.apache.org>
Sent: Wednesday, August 21, 2002 2:03 PM
Subject: Re: [VFS] The switch to commons logging.


> Hi Brian
> 
> Just because the logging switched from using the facade in Avalon Framework
> to using commons logging, doesn't mean we can't still configure the Log used
> in a FileSystemManager. The parent that creates it can initialize the Log,
> such as the FileSystemManagerFactory.

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???
e.g. one instance of FileSystemManager uses Log4J, another jdk1.4 logger and a third uses Avalon Logkit.


> 
> James
> -------
> http://radio.weblogs.com/0112098/
> ----- Original Message -----
> From: "Brian Olsen" <br...@mmmanager.org>
> To: "Jakarta Commons Developers List" <co...@jakarta.apache.org>
> Sent: Wednesday, August 21, 2002 10:22 AM
> Subject: [VFS] The switch to commons logging.
> 
> 
> Hey Adam,
> 
> I saw that you have switched VFS to the commons logging API and I'm not sure
> I'm quite comfortable with that.
> The logger class itself I have no problem with it's more the way you find
> the logger that I don't like.
> 
> When we used LogEnabled the owner of each object was given the logger by
> it's parent wich meant it was up to the creator of the FileSystemManager to
> give a logger to it.
> 
> With the new logger, AbstractFileSystem looks up its own logger using the
> logfactory using its class.
> This new way of retriving the logger I see as a lose of functionality
> because I can no longer have per instance loggers.
> 
> 
> Why don't we use the Avalon Logger internally for the VFS and put the log
> initializing code in the FileSystemManagerFactory instead???
> 
> 
> - Brian
> 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Everything you'll ever need on one web page
> from News and Sport to Email and Music Charts
> http://uk.my.yahoo.com
> 
> --
> To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
> 


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: [VFS] The switch to commons logging.

Posted by James Strachan <ja...@yahoo.co.uk>.
Hi Brian

Just because the logging switched from using the facade in Avalon Framework
to using commons logging, doesn't mean we can't still configure the Log used
in a FileSystemManager. The parent that creates it can initialize the Log,
such as the FileSystemManagerFactory.

James
-------
http://radio.weblogs.com/0112098/
----- Original Message -----
From: "Brian Olsen" <br...@mmmanager.org>
To: "Jakarta Commons Developers List" <co...@jakarta.apache.org>
Sent: Wednesday, August 21, 2002 10:22 AM
Subject: [VFS] The switch to commons logging.


Hey Adam,

I saw that you have switched VFS to the commons logging API and I'm not sure
I'm quite comfortable with that.
The logger class itself I have no problem with it's more the way you find
the logger that I don't like.

When we used LogEnabled the owner of each object was given the logger by
it's parent wich meant it was up to the creator of the FileSystemManager to
give a logger to it.

With the new logger, AbstractFileSystem looks up its own logger using the
logfactory using its class.
This new way of retriving the logger I see as a lose of functionality
because I can no longer have per instance loggers.


Why don't we use the Avalon Logger internally for the VFS and put the log
initializing code in the FileSystemManagerFactory instead???


- Brian



__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>