[ 
https://issues.apache.org/jira/browse/FELIX-482?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alin Dreghiciu updated FELIX-482:
---------------------------------

    Attachment: FELIX-482.patch

I attached a patch that changes the System.errr/System.out/printStackTrace with 
calls to LogService. 
The LogService is optional meaning that the imports for the log service package 
is optional and also the service itself is optional. If the service is 
available it uses the log service otherwise it logs depending on the log level 
to System.out or System.err.

The only thing I did not change was the call ex.printStackTrace(System.err); 
from ResourceImpl.convertURItoURL as this is used during parsing the repository 
xml and it needs a default constructor. I think that even this can be changed 
but I do not know if is such important.
If yes, then I could go further and see how I can do also that, but anyhow we 
can do it in two steps, first being applying this patch.

I could have used as Logger implementation the one from Framework but that one 
has too much reflection involved and is not required in this case. Anyhow the 
Logger from this pacth can be replaced with the one from framework and without 
any other change beside the new instance creation.

> Replace System.err logging with a log service call
> --------------------------------------------------
>
>                 Key: FELIX-482
>                 URL: https://issues.apache.org/jira/browse/FELIX-482
>             Project: Felix
>          Issue Type: Wish
>          Components: Bundle Repository (OBR)
>    Affects Versions: felix-1.0.0
>            Reporter: Alin Dreghiciu
>            Priority: Minor
>         Attachments: FELIX-482.patch
>
>
> As in version 1.0.0 of BundleRepository exceptions are logged using a 
> System.err.
> Maybe a better option would be to use log service to output the errors.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to