You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by robert burrell donkin <ro...@blueyonder.co.uk> on 2005/04/19 22:26:44 UTC

[logging] issues highlighted by analysis

here are my results obtained by comparing the theory with the current
behaviour. 

(1) JCL Behaves As Expected (50%)
---------------------------------
1,2,3,4,7,8,11,12,15,16,17,18,19,23,27,31

(2) JCL Throws Exception Rather Than Logging To Log4J (28%)
-----------------------------------------------------------
5,6,13,14,21,22,24,25,29

(3) JCL Throws Exception Rather Than Logging To java.util.logging (22%)
-----------------------------------------------------------------------
9,10,20,26,28,30,32

i've categorised them by the differences between what should happen in
theory with the current behaviour. 

i am going to create tests cases based on the ones in demonstration
which should allow accurate diagnosis of the causes. however, i have a
good idea of some of the causes and would like to start a discuss about
possible solutions in advance.

i don't propose to do anything about those in #1 ;)

i suspect that many of failure cases in #3 are caused by JCL being able
to load one or more of the appropriate classes by name from a
classloader but then throw an exception when they are not compatible.
IMHO this behaviour is counter-productive. in this case, rather than
throwing a runtime exception, JCL should conclude that log4j is actually
not really available and use java.util.logging instead. 

any opinions about changing JCL so that this approach is adopted?

i suspect that many of the failure cases in #2 are caused by JCL using
an incompatible class from the context classloader when one is available
from it's own classloader. IMHO the presence of a version of Log4J on
the context classloader should be a good enough indication that the user
intended log4j to be discovered for JCL to try to load log4j from it's
own classloader if the other fails.

opinions?

- robert


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


Re: [logging] issues highlighted by analysis

Posted by robert burrell donkin <ro...@blueyonder.co.uk>.
On Sat, 2005-04-23 at 14:12 +1200, Simon Kitching wrote:
> On Fri, 2005-04-22 at 08:54 -0700, Brian Stansberry wrote:
> > --- Simon Kitching <sk...@apache.org> wrote:
> > 
> > > On Tue, 2005-04-19 at 21:26 +0100, robert burrell
> > > donkin wrote:
> > > > here are my results obtained by comparing the
> > > theory with the current
> > > > behaviour. 
> > > > 
> > > > (1) JCL Behaves As Expected (50%)
> > > > ---------------------------------
> > > > 1,2,3,4,7,8,11,12,15,16,17,18,19,23,27,31
> > > > 
> > > > (2) JCL Throws Exception Rather Than Logging To
> > > Log4J (28%)
> > > >
> > >
> > -----------------------------------------------------------
> > > > 5,6,13,14,21,22,24,25,29
> > > > 
> > > > (3) JCL Throws Exception Rather Than Logging To
> > > java.util.logging (22%)
> > > >
> > >
> > -----------------------------------------------------------------------
> > > > 9,10,20,26,28,30,32
> > > 
> > > Where are these scenarios (1-32) documented?
> > > 
> > 
> > They're in the demonstration folder in svn.  May be
> > another way to get to it, but this works:
> > 
> > http://svn.apache.org/viewcvs.cgi/jakarta/commons/proper/logging/trunk/demonstration/src/java/overview.html?rev=159142&view=log
> 
> Thanks, found them.

i now have unit tests that replicate the failure cases.

i'm wondering whether to commit them onto a branch so that everyone can
take a look, check their accuracy and take a look at fixes. opinions?

- robert


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


Re: [logging] issues highlighted by analysis

Posted by robert burrell donkin <ro...@blueyonder.co.uk>.
On Sat, 2005-04-23 at 14:12 +1200, Simon Kitching wrote:
> On Fri, 2005-04-22 at 08:54 -0700, Brian Stansberry wrote:

<snip>

> By the way, may I suggest that stuff like this would be better off as a
> sibling directory to "trunk" rather than in the trunk? Most people
> wanting to check out trunk won't want this stuff. Fortunately, it's easy
> to move stuff around in Subversion if we want to..

i raised the question of where the best place for this stuff would be at
the time. the consensus (at the time) was that within the trunk would be
best. i can (and could) see the advantages of either solution so don't
have a strong preference. as it's in subversion, it's easy to change.

so, should the demonstration of concept analysis stuff be left where it
is or moved? opinions, please...  

> How about creating dir proper/logging/experiments/classloader-issues?
> (ie "experiments" is a sibling of trunk, tags, branches). The
> "experiments" dir can then hold all sorts of stuff without bothering
> people who just want the trunk...

it's hard to come up with good names

the content is really analysis illustrated with code (in the spirit of
ceki's critique) and it's really focused on discovery rather than
classloading in general. so. it might be a little confusing using the
name proposed but i take your point. other projects use names like
sandbox, contrib, proposal (rather than experiments). 

- robert


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


Re: [logging] issues highlighted by analysis

Posted by Simon Kitching <sk...@apache.org>.
On Fri, 2005-04-22 at 08:54 -0700, Brian Stansberry wrote:
> --- Simon Kitching <sk...@apache.org> wrote:
> 
> > On Tue, 2005-04-19 at 21:26 +0100, robert burrell
> > donkin wrote:
> > > here are my results obtained by comparing the
> > theory with the current
> > > behaviour. 
> > > 
> > > (1) JCL Behaves As Expected (50%)
> > > ---------------------------------
> > > 1,2,3,4,7,8,11,12,15,16,17,18,19,23,27,31
> > > 
> > > (2) JCL Throws Exception Rather Than Logging To
> > Log4J (28%)
> > >
> >
> -----------------------------------------------------------
> > > 5,6,13,14,21,22,24,25,29
> > > 
> > > (3) JCL Throws Exception Rather Than Logging To
> > java.util.logging (22%)
> > >
> >
> -----------------------------------------------------------------------
> > > 9,10,20,26,28,30,32
> > 
> > Where are these scenarios (1-32) documented?
> > 
> 
> They're in the demonstration folder in svn.  May be
> another way to get to it, but this works:
> 
> http://svn.apache.org/viewcvs.cgi/jakarta/commons/proper/logging/trunk/demonstration/src/java/overview.html?rev=159142&view=log

Thanks, found them.

By the way, may I suggest that stuff like this would be better off as a
sibling directory to "trunk" rather than in the trunk? Most people
wanting to check out trunk won't want this stuff. Fortunately, it's easy
to move stuff around in Subversion if we want to..

How about creating dir proper/logging/experiments/classloader-issues?
(ie "experiments" is a sibling of trunk, tags, branches). The
"experiments" dir can then hold all sorts of stuff without bothering
people who just want the trunk...

Cheers,

Simon


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


Re: [logging] issues highlighted by analysis

Posted by Brian Stansberry <be...@yahoo.com>.
--- Simon Kitching <sk...@apache.org> wrote:

> On Tue, 2005-04-19 at 21:26 +0100, robert burrell
> donkin wrote:
> > here are my results obtained by comparing the
> theory with the current
> > behaviour. 
> > 
> > (1) JCL Behaves As Expected (50%)
> > ---------------------------------
> > 1,2,3,4,7,8,11,12,15,16,17,18,19,23,27,31
> > 
> > (2) JCL Throws Exception Rather Than Logging To
> Log4J (28%)
> >
>
-----------------------------------------------------------
> > 5,6,13,14,21,22,24,25,29
> > 
> > (3) JCL Throws Exception Rather Than Logging To
> java.util.logging (22%)
> >
>
-----------------------------------------------------------------------
> > 9,10,20,26,28,30,32
> 
> Where are these scenarios (1-32) documented?
> 

They're in the demonstration folder in svn.  May be
another way to get to it, but this works:

http://svn.apache.org/viewcvs.cgi/jakarta/commons/proper/logging/trunk/demonstration/src/java/overview.html?rev=159142&view=log

Brian

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


Re: [logging] issues highlighted by analysis

Posted by Simon Kitching <sk...@apache.org>.
On Tue, 2005-04-19 at 21:26 +0100, robert burrell donkin wrote:
> here are my results obtained by comparing the theory with the current
> behaviour. 
> 
> (1) JCL Behaves As Expected (50%)
> ---------------------------------
> 1,2,3,4,7,8,11,12,15,16,17,18,19,23,27,31
> 
> (2) JCL Throws Exception Rather Than Logging To Log4J (28%)
> -----------------------------------------------------------
> 5,6,13,14,21,22,24,25,29
> 
> (3) JCL Throws Exception Rather Than Logging To java.util.logging (22%)
> -----------------------------------------------------------------------
> 9,10,20,26,28,30,32

Where are these scenarios (1-32) documented?


Thanks,

Simon


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