[slf4j-dev] Usage of Markers

Szel, Zoltan Zoli.Szel at MorganStanley.com
Thu Jun 4 13:03:53 CEST 2009


Hi all,

we are planning to build alerting functionality around the SLF4J API and we thought about leveraging the Marker API for this. The reason why we need Markers is simple, more information have to be provided to perform the required LoggingEvent => AlertEvent conversion. What I have in my mind is the following:
Create an Alert marker which implements the marker interface + have additional getters/setters to provide the required properties to the alerting appender. The usage would look like this:

Logger.error(new Alert(...),"The aircondition is down")

However this does not seems to be the recommended way for using Markers where you would consult with the MarkerFactory for the appropriate Marker instance(MarkerFactory.getMarker("ALERT")).

What's your thought on using Marker's in this way? If you see any problem with it what would you recommend to provide extra contextual data to the log message(MDC is not appropriate here given the amount of code one might have to write to populate the Map)?

Thanks for your help in advance!

Kind Regards,
Zoltan Szel
Morgan Stanley | IDEAS Practice Areas
Lechner Odon fasor 8 | Floor 07
Budapest, 1095
Phone: +36 1 881-3978
Zoli.Szel at MorganStanley.com<mailto:Zoli.Szel at MorganStanley.com>

--------------------------------------------------------------------------
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://qos.ch/pipermail/slf4j-dev/attachments/20090604/924b7663/attachment.htm>


More information about the slf4j-dev mailing list