<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Ceki Gulcu schrieb:
<blockquote cite="mid:48FC66C4.6000900@qos.ch" type="cite">
<pre wrap="">Hello Ekke,
What is it that you are trying to accomplish, in plain English?
</pre>
</blockquote>
My Logger objects are in each class<br>
but I also want to know the OSGI Bundle name from where the log entry
comes<br>
and - optional - the OSGI Service names from where the event happened<br>
<br>
I store these names in Markers, so later I can get the information to
print them<br>
(this was the reason I'm using a custom BundleMarkerConverter and in my
Layout I say %bundlemarker)<br>
<br>
the Bundle is always there<br>
If I'm also logging from an OSGI Service I create a Marker as
ServiceMarker<br>
(there can be more then one ServiceMarkers in some situations)<br>
<br>
I'm using bundleMarker.add(serviceMarker)<br>
<br>
so my LogEntry has always one BundleMarker and optional one or more
ServiceMarker added<br>
<br>
to know if its a BundleMarker or ServiceMarker the names have a prefix
to distinguish<br>
<br>
for different situations or different appenders I'm using different
MarkerConverter classes<br>
to get %bundlemarker, %servicemarker or %bundlewithservicemarker<br>
<br>
%bundlemarker is always only one name of the OSGI bundle<br>
%servicemarker is empty or one or an array of OSGI Service names<br>
and %bundlewithservicemarker is a combination of both<br>
<br>
at the moment I have only written the MarkerConverter class for
BundleMarker<br>
and all works well<br>
<br>
now I read about your Marker - graphs and only wanted to ask whats the
best to get<br>
all ServiceMarkers from the graph<br>
to decide if a Marker is a ServiceMarker I have to see if the name
starts with a given prefix<br>
<br>
I hope you understand what I mean ;-)<br>
<br>
ekke<br>
<blockquote cite="mid:48FC66C4.6000900@qos.ch" type="cite">
<pre wrap="">
ekkehard wrote:
</pre>
<blockquote type="cite">
<pre wrap="">I read about the changes with Markers - thanks - I also was thinking
about Markers
as a tree - now I know its only a graph of connected Markers
following scenario:
create a Marker with a Bundle-Name
add one or more Marker with Service-Names
then I have a BundleMarkerConverter.
Testing
marker.getName().startsWith(ConstantsAndProperties.BUNDLE_MARKER_PREFIX)
I know if its a BundleMarker
now there can be Markers with SERVICE_MARKER_PREFIX in the graph -
whats the recommanded way to get them all:
using the iterator ?
thx
ekke
</pre>
</blockquote>
<pre wrap=""><!----></pre>
</blockquote>
<br>
</body>
</html>