[
https://issues.apache.org/jira/browse/SLING-4510?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
David Bosschaert updated SLING-4510:
------------------------------------
Attachment: SLING-4510.diff
The attached patch changes the output for service log messages to include the
ObjectClass property value (which is of type {{String[]}} and always set). For
example:
{code}
some.bsn Service [4242, [com.acme.ServiceInterfaceName]] ServiceEvent REGISTERED
{code}
I also noticed that there was some string manipulation code in the
{{serviceChanged()}} and {{frameworkEvent()}} that initialized a {{String s}}
variable with a message which was then never used. I removed this code which
was adding unnecessary processing to these log methods.
Finally I added an 'early exit' mechanism to the {{logOut()}} method to avoid
constructing a log message if it wasn't going to be logged in the first place.
I also added unit tests for the new code that I added here.
> Sling LogService could provide more usable output
> -------------------------------------------------
>
> Key: SLING-4510
> URL: https://issues.apache.org/jira/browse/SLING-4510
> Project: Sling
> Issue Type: Bug
> Components: Commons
> Affects Versions: Commons Log Service 1.0.2
> Reporter: David Bosschaert
> Priority: Minor
> Fix For: Commons Log Service 1.0.4
>
> Attachments: SLING-4510.diff
>
>
> The Sling Log Service generates log messages when services change. However
> the information in those log messages could be improved. For example the
> following is a typical log message:
> {code}some.bsn Service [4242] ServiceEvent REGISTERED{code}
> It would be good to expand the log message to include the service's
> ObjectClass so that you know which service is actually being registered.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)