>Yes, the appender needs the data. In the Appender just do
>EventData data = new EventData(event.getMessage());
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.

> making a Marker a heavyweight object.
I do not want to put any logic in there. It would be a simple JavaBean(except 
the fact it implements Marker ;-), nothing more.

Regards,
Zoltan Szel
Morgan Stanley | IDEAS Practice Areas
Lechner Odon fasor 8 | Floor 07
Budapest, 1095
Phone: +36 1 881-3978
zoli.s...@morganstanley.com<mailto:zoli.s...@morganstanley.com>
From: dev-boun...@slf4j.org [mailto:dev-boun...@slf4j.org] On Behalf Of Ralph 
Goers
Sent: Friday, June 05, 2009 3:32 PM
To: slf4j developers list
Subject: Re: [slf4j-dev] Usage of Markers


On Jun 4, 2009, at 7:37 AM, Szel, Zoltan wrote:


> The issue is in what the benefit is in having Markers for each of the various 
> kinds of alerts
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).

>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.
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.


Yes, the appender needs the data. In the Appender just do
EventData data = new EventData(event.getMessage());

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.

Ralph

--------------------------------------------------------------------------
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. Morgan Stanley may monitor and store emails to the 
extent permitted by applicable law.
_______________________________________________
dev mailing list
dev@slf4j.org
http://www.slf4j.org/mailman/listinfo/dev

Reply via email to