logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gary Gregory <garydgreg...@gmail.com>
Subject printStackTrace in v2 trunk
Date Thu, 18 Jul 2013 01:55:44 GMT
Hi all,

If you scan the source for all senders of "printStackTrace" you'll find  21
references.

Are all of those correct instead of logging to StatusLogger or throwing an
exception or a different exception in the case where this is done in
response to catching an exception.

Also, in some cases like
org.apache.logging.log4j.ReflectionComparison.setupCallerCheck(), both are
done:

        } catch (final ClassNotFoundException cnfe) {
            cnfe.printStackTrace();
            throw new RuntimeException(cnfe);
        }

In this case, should we not call StatusLogger?

I'd also rather never throw a RuntimeException*, *instead an
IllegalStateException.

Also, this method is undocumented and uses a dynamic reference to the Java
7 sun.reflect.Reflection class. How is that going to work on an IBM JVM?

Gary


-- 
E-Mail: garydgregory@gmail.com | ggregory@apache.org
Java Persistence with Hibernate, Second Edition<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory

Mime
View raw message