Re: [logging] branches/allow-flawed

2005-06-06 Thread Brian Stansberry
--- Simon Kitching <[EMAIL PROTECTED]> wrote:
> Hi,
> 
> As you may have seen from the commit email, I have
> created a branch
> "allow-flawed". This contains an attempt to
> implement "fallback" as
> described in this bugzilla entry:
>  
>
http://issues.apache.org/bugzilla/show_bug.cgi?id=34661
> 

This looks quite nice.  The flexibility that comes
with the 3 different "ALLOW_FLAWED..." properties is
interesting.  For example (just thinking out loud
here), a default of "false" for ALLOW_FLAWED_CONTEXT
and ALLOW_FLAWED_DISCOVERY might make sense.  These
really indicate something strange, vs. the more normal
hierarchy problem.

> The code in this branch passes all unit tests, and
> 100% of the
> "demonstration" tests. It does have one TODO item in
> there to do with
> AccessController but that's not relevant for the
> moment.
> 

Was going to ask about the missing AccessController
stuff, but then reread your note :)

Best regards,
Brian



__ 
Discover Yahoo! 
Get on-the-go sports scores, stock quotes, news and more. Check it out! 
http://discover.yahoo.com/mobile.html

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[logging] branches/allow-flawed

2005-06-06 Thread Simon Kitching
Hi,

As you may have seen from the commit email, I have created a branch
"allow-flawed". This contains an attempt to implement "fallback" as
described in this bugzilla entry:
  http://issues.apache.org/bugzilla/show_bug.cgi?id=34661

The code in this branch passes all unit tests, and 100% of the
"demonstration" tests. It does have one TODO item in there to do with
AccessController but that's not relevant for the moment.

You can see the patch between this and the trunk via:
  proper=http://svn.apache.org/repos/asf/jakarta/commons/proper
  base=${proper}/logging/branches/allow-flawed

  # show all the files that changed between trunk and this branch
  #
  # Note that there appears to be a bug in subversion; it reports
  # a number of files as "R" (replaced) when they haven't been
  # touched..running a diff on them as shown below outputs nothing.
  svn log -v -r188671:HEAD ${base}

  # show the changes made on this branch for file Foo.java
  svn diff -r188671:HEAD ${base}/src/java/./Foo.java

The files that really have changed are:
  * LogFactoryImpl.java
  * test/.../UserClass.java
  * test/.../LoadTest.java

Comments are welcome

Regards,

Simon


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



svn commit: r188671 - in /jakarta/commons/proper/logging/branches/allow-flawed: ./ src/java/org/ src/java/org/apache/commons/logging/impl/ src/test/org/apache/commons/logging/ src/test/org/apache/commons/logging/jdk14/

2005-06-06 Thread skitching
Author: skitching
Date: Mon Jun  6 19:48:27 2005
New Revision: 188671

URL: http://svn.apache.org/viewcvs?rev=188671&view=rev
Log:
Created branch for allow-flawed experimental code.

Added:
jakarta/commons/proper/logging/branches/allow-flawed/
  - copied from r176414, jakarta/commons/proper/logging/trunk/
jakarta/commons/proper/logging/branches/allow-flawed/build.xml
  - copied unchanged from r179559, 
jakarta/commons/proper/logging/trunk/build.xml
jakarta/commons/proper/logging/branches/allow-flawed/maven.xml
  - copied unchanged from r176497, 
jakarta/commons/proper/logging/trunk/maven.xml
jakarta/commons/proper/logging/branches/allow-flawed/project.properties
  - copied unchanged from r176581, 
jakarta/commons/proper/logging/trunk/project.properties
jakarta/commons/proper/logging/branches/allow-flawed/src/java/org/
  - copied from r179499, jakarta/commons/proper/logging/trunk/src/java/org/

jakarta/commons/proper/logging/branches/allow-flawed/src/java/org/apache/commons/logging/impl/Jdk13LumberjackLogger.java
  - copied unchanged from r179529, 
jakarta/commons/proper/logging/trunk/src/java/org/apache/commons/logging/impl/Jdk13LumberjackLogger.java

jakarta/commons/proper/logging/branches/allow-flawed/src/java/org/apache/commons/logging/impl/Jdk14Logger.java
  - copied unchanged from r179529, 
jakarta/commons/proper/logging/trunk/src/java/org/apache/commons/logging/impl/Jdk14Logger.java

jakarta/commons/proper/logging/branches/allow-flawed/src/java/org/apache/commons/logging/impl/LogFactoryImpl.java
  - copied, changed from r180287, 
jakarta/commons/proper/logging/trunk/src/java/org/apache/commons/logging/impl/LogFactoryImpl.java

jakarta/commons/proper/logging/branches/allow-flawed/src/test/org/apache/commons/logging/LoadTest.java
  - copied, changed from r179566, 
jakarta/commons/proper/logging/trunk/src/test/org/apache/commons/logging/LoadTest.java

jakarta/commons/proper/logging/branches/allow-flawed/src/test/org/apache/commons/logging/TestAll.java
  - copied unchanged from r179566, 
jakarta/commons/proper/logging/trunk/src/test/org/apache/commons/logging/TestAll.java

jakarta/commons/proper/logging/branches/allow-flawed/src/test/org/apache/commons/logging/jdk14/CustomConfigTestCase.java
  - copied unchanged from r177867, 
jakarta/commons/proper/logging/trunk/src/test/org/apache/commons/logging/jdk14/CustomConfigTestCase.java
Modified:

jakarta/commons/proper/logging/branches/allow-flawed/src/test/org/apache/commons/logging/UserClass.java

Copied: 
jakarta/commons/proper/logging/branches/allow-flawed/src/java/org/apache/commons/logging/impl/LogFactoryImpl.java
 (from r180287, 
jakarta/commons/proper/logging/trunk/src/java/org/apache/commons/logging/impl/LogFactoryImpl.java)
URL: 
http://svn.apache.org/viewcvs/jakarta/commons/proper/logging/branches/allow-flawed/src/java/org/apache/commons/logging/impl/LogFactoryImpl.java?p2=jakarta/commons/proper/logging/branches/allow-flawed/src/java/org/apache/commons/logging/impl/LogFactoryImpl.java&p1=jakarta/commons/proper/logging/trunk/src/java/org/apache/commons/logging/impl/LogFactoryImpl.java&r1=180287&r2=188671&rev=188671&view=diff
==
--- 
jakarta/commons/proper/logging/trunk/src/java/org/apache/commons/logging/impl/LogFactoryImpl.java
 (original)
+++ 
jakarta/commons/proper/logging/branches/allow-flawed/src/java/org/apache/commons/logging/impl/LogFactoryImpl.java
 Mon Jun  6 19:48:27 2005
@@ -20,8 +20,6 @@
 import java.lang.reflect.Constructor;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
 import java.util.Enumeration;
 import java.util.Hashtable;
 import java.util.Vector;
@@ -99,6 +97,49 @@
 protected static final String LOG_PROPERTY_OLD =
 "org.apache.commons.logging.log";
 
+/**
+ * The name of the system property which can be set true/false to
+ * determine system behaviour when a bad context-classloader is 
encountered.
+ * When set to false
+ * 
+ * Default behaviour: true (tolerates bad context classloaders)
+ * 
+ * See also method setAttribute.
+ */
+public static final String ALLOW_FLAWED_CONTEXT_PROPERTY = 
+"org.apache.commons.logging.Log.allowFlawedContext";
+
+/**
+ * The name of the system property which can be set true/false to
+ * determine system behaviour when a bad logging adapter class is
+ * encountered during logging discovery. When set to false, an
+ * exception will be thrown and the app will fail to start. When set
+ * to true, discovery will continue (though the user might end up
+ * with a different logging implementation than they expected).
+ * 
+ * Default behaviour: true (tolerates bad loggin