felix-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard S. Hall (JIRA)" <j...@apache.org>
Subject [jira] Commented: (FELIX-1124) ResourceNotFoundException too verbose
Date Mon, 13 Jul 2009 12:45:15 GMT

    [ https://issues.apache.org/jira/browse/FELIX-1124?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12730319#action_12730319
] 

Richard S. Hall commented on FELIX-1124:
----------------------------------------

Sorry for being confusing and/or confused. I know the exception is being thrown from there,
my point is that the framework is not responsible for printing the verbose message. So now
it seems clear the LogService impl is printing the information. So, in your original description
you ask to let the client decide how verbose to be, so isn't this an issue of the LogService
impl being too verbose, not the framework?

If we don't include the exception, then no logger would be able to get the information even
if they wanted it.

> 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.


Mime
View raw message