[
https://jira.jboss.org/jira/browse/JBSEAM-2232?page=com.atlassian.jira.pl...
]
Christian Bauer commented on JBSEAM-2232:
-----------------------------------------
One more thing and a mistake I've seen a few times in the Seam codebase - let's
not repeat them on Web Beans:
org.jboss.seam.deployment.ClassDescriptor
try
{
clazz = classLoader.loadClass(classname);
// IBM JVM will throw a TypeNotPresentException if any annotation on the class is
not on
// the classpath, rendering the class virtually unusable (given Seam's heavy
use of annotations)
clazz.getAnnotations();
}
catch (ClassNotFoundException cnfe)
{
log.info("could not load class: " + classname, cnfe);
}
catch (NoClassDefFoundError ncdfe)
{
log.debug("could not load class (missing dependency): " + classname,
ncdfe);
}
catch (TypeNotPresentException tnpe)
{
clazz = null;
log.debug("could not load class (annotation missing dependency): " +
classname, tnpe);
}
If you want to "inform" the user about something, it's enough if you print a
message. Don't print a stacktrace that has no information that the user is going to
need at this point. Otherwise, debug level printing if the stacktrace can probably be
considered OK although I'd do that at TRACE. Or much better, tell the user how to get
more output if necessary: "This is a warning because you did this or that, and enable
DEBUG|TRACE for more information".
What I'm trying to say is: Apply some common sense when you log stuff and don't
think about what's useful to you but what the user is ultimately supposed to do when
he reads that message.
Full review of Seam's log levels
--------------------------------
Key: JBSEAM-2232
URL:
https://jira.jboss.org/jira/browse/JBSEAM-2232
Project: Seam
Issue Type: Task
Components: Core
Reporter: Christian Bauer
Assignee: Pete Muir
Priority: Blocker
Fix For: 2.1.2.GA
Debug logging with Seam 2.x is completely useless. The most critical information in the
debug log is the instantiation and lookup of components, however, if you enable DEBUG for
org.jboss.seam.Component, you get thousands of these:
12:26:06,282 DEBUG [Component] instantiating Seam component: org.jboss.seam.core.events
12:26:06,282 DEBUG [Component] initializing new instance of: org.jboss.seam.core.events
12:26:06,282 DEBUG [Component] done initializing: org.jboss.seam.core.events
We need to exclude the event firing from debug logging, even if we hardcode it. And, are
these events really useful? I have no idea why and when I'd want to listen to
"context variable initialized" events.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira