[
https://issues.apache.org/jira/browse/FELIX-1124?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12730340#action_12730340
]
Thomas Diesler commented on FELIX-1124:
---------------------------------------
I see what you are saying, on the other hand can a LogService really choose not
to log Exceptions in level debug even if a client explicitly asks the
LogService to do so?
IMHO, the client of the LogService should decide whether the Exception stack
trace is relevant (i.e. should go to the log file) or not. The LogService
cannot make this decision based on the level alone.
Yes, indeed I pass in a Felix logger when I construct the framework. All
messages (from the LogService as well as from the Framework itself) get routed
to the configured Log4J file.
https://anonsvn.jboss.org/repos/jbossas/projects/jboss-osgi/projects/runtime/felix/trunk/src/main/java/org/jboss/osgi/felix/framework/FelixLogger.java
> ResourceNotFoundException too verbose
> -------------------------------------
>
> Key: FELIX-1124
> URL: https://issues.apache.org/jira/browse/FELIX-1124
> Project: Felix
> Issue Type: Bug
> Components: Framework
> Affects Versions: felix-1.6.1, felix-1.8.0, felix-1.8.1
> Reporter: Thomas Diesler
>
> ModuleImpl logs stack traces for every resource that cannot be found. Often
> resources are optional or may be located at different locations.
> public URL getResourceByDelegation(String name)
> {
> try
> {
> return (URL) findClassOrResourceByDelegation(name, false);
> }
> catch (ClassNotFoundException ex)
> {
> // This should never be thrown because we are loading resources.
> }
> catch (ResourceNotFoundException ex)
> {
> m_logger.log(
> Logger.LOG_DEBUG,
> ex.getMessage(),
> ex);
> }
> return null;
> }
> Please consider a log message without stack trace and leave it to the client
> to be more verbose when appropriate.
> To log no message at all and simply return null would also be consistent with
> http://java.sun.com/javase/6/docs/api/java/lang/ClassLoader.html#getResource(java.lang.String)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.