<HTML xmlns="http://www.w3.org/TR/REC-html40" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:w="urn:schemas-microsoft-com:office:word"><head><META content="text/html; charset=us-ascii" http-equiv="Content-Type">
<meta content="text/html; charset=us-ascii" http-equiv=Content-Type>
<meta content="Microsoft Word 12 (filtered medium)" name=Generator>
<style>
<!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.apple-style-span
{mso-style-name:apple-style-span;}
span.apple-converted-space
{mso-style-name:apple-converted-space;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page Section1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
{page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head><BODY>
<DIV>
<div class=Section1>
<p class=MsoNormal>>Yes, the appender needs the data. In the Appender just
do <o:p></o:p></p>
<p class=MsoNormal>>EventData data = new EventData(event.getMessage());<o:p></o:p></p>
<p class=MsoNormal>I see but performance concerns me a bit here: Serializing
out a Map<String,Object> 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.<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>> making a Marker a heavyweight object.<o:p></o:p></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>I do not want to put any logic in there. It would be a simple JavaBean(except
the fact it implements Marker ;-), nothing more.<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Regards,<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:10.0pt;font-family:"Arial","sans-serif";
color:black'>Zoltan Szel<br>
</span><b><span style='font-size:7.5pt;font-family:"Arial","sans-serif";
color:black'>Morgan Stanley | IDEAS Practice Areas<br>
</span></b><span style='font-size:7.5pt;font-family:"Arial","sans-serif";
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"><span style='color:blue'>Zoli.Szel@MorganStanley.com</span></a></span><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p></o:p></span></p>
<div>
<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'>
<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>
dev-bounces@slf4j.org [mailto:dev-bounces@slf4j.org] <b>On Behalf Of </b>Ralph
Goers<br>
<b>Sent:</b> Friday, June 05, 2009 3:32 PM<br>
<b>To:</b> slf4j developers list<br>
<b>Subject:</b> Re: [slf4j-dev] Usage of Markers<o:p></o:p></span></p>
</div>
</div>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<div>
<div>
<p class=MsoNormal>On Jun 4, 2009, at 7:37 AM, Szel, Zoltan wrote:<o:p></o:p></p>
</div>
<p class=MsoNormal><br>
<br>
<o:p></o:p></p>
<div>
<div>
<div>
<div>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>></span><span class=apple-converted-space><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<o:p></o:p></span></p>
</div>
<div>
<p class=MsoNormal><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).<o:p></o:p></span></p>
</div>
<div>
<p class=MsoNormal><span style='color:black'> <o:p></o:p></span></p>
</div>
<div>
<p class=MsoNormal><span style='color:black'>>If you check out the SLF4J
extensions you will find an EventLogger class that is meant to do this kind of
>thing. It uses a Marker to categorize the log record as an Event. It then
uses a companion EventData class to >capture the specific data related to
the event.<o:p></o:p></span></p>
</div>
<div>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>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'><o:p></o:p></span></p>
</div>
</div>
</div>
</div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<div>
<p class=MsoNormal>Yes, the appender needs the data. In the Appender just
do <o:p></o:p></p>
</div>
<div>
<p class=MsoNormal>EventData data = new EventData(event.getMessage());<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<p class=MsoNormal>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.<o:p></o:p></p>
</div>
<div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
<div>
<p class=MsoNormal>Ralph<o:p></o:p></p>
</div>
</div>
</div>
</DIV>
<DIV>
<HR>
</DIV>
<P CLASS="BulletedList" STYLE="MARGIN: 0in 0in 0pt; TEXT-INDENT: 0in; mso-list: none; tab-stops: .5in"><SPAN STYLE="FONT-SIZE: 8pt; COLOR: gray; mso-bidi-font-family: Arial"><FONT COLOR="gray" FACE="Arial" SIZE="1">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; FONT-FAMILY: 'Arial','sans-serif'; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-ansi-language: EN-GB; mso-fareast-language: EN-US; mso-bidi-language: AR-SA">Morgan Stanley may monitor and store emails to the extent permitted by applicable law.</SPAN></FONT></SPAN></P>
<DIV></DIV></BODY></HTML>