<br><br><div class="gmail_quote">On Fri, Jun 5, 2009 at 7:00 AM, Szel, Zoltan <span dir="ltr">&lt;<a href="mailto:Zoli.Szel@morganstanley.com">Zoli.Szel@morganstanley.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">






<div>
<div>

<div><div class="im">

<p>&gt;Yes, the appender needs the data. In the Appender just
do </p>

<p>&gt;EventData data = new EventData(event.getMessage());</p>

</div><p>I see but performance concerns me a bit here: Serializing
out a Map&lt;String,Object&gt; instance to xml and recreating it at the
appender level will perform very poorly  and completely unnecessary. I
also want the messages to be logged as they would be normal log messages but
this way the message would be an xml message which is not what the user passed
to me.</p></div></div></div></blockquote><div>Yes. Unfortunately the LocationAwareLogger can&#39;t pass the arguments to Logback so it had to be done this way to get the location information. This isn&#39;t always essential though so an alternate method could be added that allows the EventData object to be passed through. Then the appender would be written to use the EventData if it is present and serialize the message if it is not. <br>
</div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div><div><p></p><div class="im">

<p> </p>

<p>&gt; making a Marker a heavyweight object.</p>

</div><p><span style="font-size: 11pt; color: rgb(31, 73, 125);">I do not want to put any logic in there. It would be a simple JavaBean(except
the fact it implements Marker ;-), nothing more.</span></p></div></div></div></blockquote><div>I understand. I am just uncomfortable with Markers being used that way. <br></div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div><div><p><span style="font-size: 11pt; color: rgb(31, 73, 125);"></span></p><div class="im">

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">Regards,</span></p>

<p><span style="font-size: 10pt; color: black;">Zoltan Szel<br>
</span><b><span style="font-size: 7.5pt; color: black;">Morgan Stanley | IDEAS Practice Areas<br>
</span></b><span style="font-size: 7.5pt; color: black;">Lechner Odon fasor 8 | Floor 07<br>
Budapest, 1095<br>
Phone: +36 1 881-3978<br>
<a href="mailto:Zoli.Szel@MorganStanley.com" target="_blank"><span style="color: blue;">Zoli.Szel@MorganStanley.com</span></a></span><span style="font-size: 11pt; color: rgb(31, 73, 125);"></span></p>

</div><div>

<div style="border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0in 0in;">

<p><b><span style="font-size: 10pt;">From:</span></b><span style="font-size: 10pt;">
<a href="mailto:dev-bounces@slf4j.org" target="_blank">dev-bounces@slf4j.org</a> [mailto:<a href="mailto:dev-bounces@slf4j.org" target="_blank">dev-bounces@slf4j.org</a>] <b>On Behalf Of </b>Ralph
Goers<br>
<b>Sent:</b> Friday, June 05, 2009 3:32 PM<div class="im"><br>
<b>To:</b> slf4j developers list<br>
<b>Subject:</b> Re: [slf4j-dev] Usage of Markers</div></span></p>

</div>

</div>

<p> </p>

<p> </p>

<div>

<div>

<p>On Jun 4, 2009, at 7:37 AM, Szel, Zoltan wrote:</p>

</div><div><div></div><div class="h5">

<p><br>
<br>
</p>

<div>

<div>

<div>

<div>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">&gt;</span><span><span style="color: black;"> </span></span><span style="color: black;">The issue is
in what the benefit is in having Markers for each of the various kinds of alerts</span></p>

</div>

<div>

<p><span style="color: black;">There would be only one Marker
implementation which would contain any information required(alertkey,
level1/level2 classification etc) to send an alert. This would allow the
flexibility to send different alerts with the same API(they can provide
defaults, but it would not be enough given that different infrastructure
components will send alerts with different properties).</span></p>

</div>

<div>

<p><span style="color: black;"> </span></p>

</div>

<div>

<p><span style="color: black;">&gt;If you check out the SLF4J
extensions you will find an EventLogger class that is meant to do this kind of
&gt;thing. It uses a Marker to categorize the log record as an Event. It then
uses a companion EventData class to &gt;capture the specific data related to
the event.</span></p>

</div>

<div>

<p><span style="font-size: 11pt; color: rgb(31, 73, 125);">I have checked it out and what I have found is that the
EventData is simply logged as an xml via an SLF4J logger. This is insufficient
for me because the companion data needs to be available in the appender itself,
because he is the only one who knows how to interpret  them.<br>
<br>
</span><span style="color: black;"></span></p>

</div>

</div>

</div>

</div>

<p> </p>

</div></div></div><div><div></div><div class="h5">

<div>

<div>

<p>Yes, the appender needs the data. In the Appender just
do </p>

</div>

<div>

<p>EventData data = new EventData(event.getMessage());</p>

</div>

<div>

<p> </p>

</div>

<div>

<p>You then have access to all your event data. It is not a big
deal and is much better than making a Marker a heavyweight object.</p>

</div>

<div>

<p> </p>

</div>

<div>

<p>Ralph</p>

</div>

</div>

</div></div></div>

</div>
<div>
<hr>
</div><div class="im">
<p style="margin: 0in 0in 0pt; text-indent: 0in;"><span style="font-size: 8pt; color: gray;"><font size="1" color="gray" face="Arial">NOTICE: If received in error, please destroy and notify sender. Sender does not intend to waive confidentiality or privilege. Use of this email is prohibited when received in error. <span style="font-size: 7.5pt; color: gray;">Morgan Stanley may monitor and store emails to the extent permitted by applicable law.</span></font></span></p>

<div></div></div></div>
<br>_______________________________________________<br>
dev mailing list<br>
<a href="mailto:dev@slf4j.org">dev@slf4j.org</a><br>
<a href="http://www.slf4j.org/mailman/listinfo/dev" target="_blank">http://www.slf4j.org/mailman/listinfo/dev</a><br></blockquote></div><br>