[ 
http://issues.ops4j.org/jira/browse/PAXLOGGING-15?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_11346
 ] 

Stuart McCulloch commented on PAXLOGGING-15:
--------------------------------------------

Section 101.8.2.1, page 12 of the compendium spec states that for the LogEntry 
object:

    public Bundle getBundle( )
        Returns The bundle that created this LogEntry object; null if no bundle 
is associated with this LogEntry object.

though if you were being picky then you could say this doesn't stop you from 
returning null in all cases.

Also sections 101.8.5.5 to 101.8.5.8, page 15 of the compendium does mention 
explicitly when the Throwable and ServiceReference fields of the LogEntry will 
be null for different combinations of log(...) but never says that the Bundle 
field will be null for any of these combinations.

Finally note that while some log(...) methods pass in a ServiceReference, this 
should not be used to fill in the Bundle field, because it may not relate to 
the calling bundle, as the service was most likely registered by another bundle 
- so even in these cases the calling bundle (as provided by the service 
factory) should be used.

> OSGi TCK test failure: LogEntry instances have null bundle fields
> -----------------------------------------------------------------
>
>                 Key: PAXLOGGING-15
>                 URL: http://issues.ops4j.org/jira/browse/PAXLOGGING-15
>             Project: Pax Logging
>          Issue Type: Bug
>    Affects Versions: 0.9.7
>            Reporter: Stuart McCulloch
>            Assignee: Stuart McCulloch
>             Fix For: 1.0
>
>
> Most of the LogEntry events generated by Pax-Logging have null bundle fields, 
> because the calling bundle is not provided in the LogService  API. To fill in 
> the bundle field we need to implement the ServiceFactory interface and supply 
> a customized instance for each bundle that basically delegates to the 
> underlying Pax-Logging service instance.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.ops4j.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

_______________________________________________
general mailing list
[email protected]
http://lists.ops4j.org/mailman/listinfo/general

Reply via email to