<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html>
<head>
<meta name="Generator" content="Zarafa WebAccess v6.30.2-16545">
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<title>RE: [slf4j-dev] Feature Request</title>
<style type="text/css">
body
{
font-family: Arial, Verdana, Sans-Serif;
font-size: 12px;
padding: 5px 5px 5px 5px;
margin: 0px;
border-style: none;
background-color: #ffffff;
}
p, ul, li
{
margin-top: 0px;
margin-bottom: 0px;
}
</style>
</head>
<body>
<p> <span style="font-size: 12px; "><span style="font-family: Arial; "> Hey Guys, </span></span></p><p><span style="font-size: 12px; "><span style="font-family: Arial; "><br type="_moz" />I thought I could just write a little implementation. Basically it is your LocLogger, with a few lines changed.</span></span></p><p><span style="font-size: 12px; "><span style="font-family: Arial; "><br type="_moz" /></span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; ">package org.slf4j.cal10n;</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "><br type="_moz" /></span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; ">import org.slf4j.Logger;</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; ">import org.slf4j.Marker;</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; ">import org.slf4j.MarkerFactory;</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; ">import org.slf4j.ext.LoggerWrapper;</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; ">import org.slf4j.spi.LocationAwareLogger;</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; min-height: 15.0px"><span style="font-size: 12px; "><span style="font-family: Arial; "><br /></span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; ">import ch.qos.cal10n.IMessageConveyor;</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; ">import ch.qos.cal10n.MessageParameterObj;</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; min-height: 15.0px"><span style="font-size: 12px; "><span style="font-family: Arial; "><br /></span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #3f5fbf"><span style="font-size: 12px; "><span style="font-family: Arial; ">/**</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #3f5fbf"><span style="font-size: 12px; "><span style="font-family: Arial; "> * A logger specialized in localized logging. Localization is based in the <a</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #3f5fbf"><span style="font-size: 12px; "><span style="font-family: Arial; "> * href="http://cal10n.qos.ch">CAL10N project</p>.</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> * </span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #3f5fbf"><span style="font-size: 12px; "><span style="font-family: Arial; "> * @author Ceki G&uuml;lc&uuml;</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #3f5fbf"><span style="font-size: 12px; "><span style="font-family: Arial; "> */</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; ">public class CodeLocLogger extends LoggerWrapper implements Logger {</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; min-height: 15.0px"><span style="font-size: 12px; "><span style="font-family: Arial; "><br /></span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> private static final String FQCN = CodeLocLogger.class.getName();</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; min-height: 15.0px"><span style="font-size: 12px; "><span style="font-family: Arial; "><br /></span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #3f5fbf"><span style="font-size: 12px; "><span style="font-family: Arial; "> /**</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #3f5fbf"><span style="font-size: 12px; "><span style="font-family: Arial; "> * Every localized message logged by a LocLogger will bear this marker. It</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #3f5fbf"><span style="font-size: 12px; "><span style="font-family: Arial; "> * allows marker-aware implementations to perform additional processing on</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #3f5fbf"><span style="font-size: 12px; "><span style="font-family: Arial; "> * localized messages.</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> */</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> static Marker LOCALIZED = MarkerFactory.getMarker("LOCALIZED");</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; min-height: 15.0px"><span style="font-size: 12px; "><span style="font-family: Arial; "><br /></span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> final IMessageConveyor imc;</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; min-height: 15.0px"><span style="font-size: 12px; "><span style="font-family: Arial; "><br /></span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> public CodeLocLogger(Logger logger, IMessageConveyor imc) {</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> super(logger, LoggerWrapper.class.getName());</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> if(imc == null) {</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> throw new IllegalArgumentException("IMessageConveyor cannot be null");</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> }</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> this.imc = imc;</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> }</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; min-height: 15.0px"><span style="font-size: 12px; "><span style="font-family: Arial; "><br /></span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #3f5fbf"><span style="font-size: 12px; "><span style="font-family: Arial; "> /**</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #3f5fbf"><span style="font-size: 12px; "><span style="font-family: Arial; "> * Log a localized message at the TRACE level.</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> * </span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #7f9fbf"><span style="font-size: 12px; "><span style="font-family: Arial; "> * @param key</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #3f5fbf"><span style="font-size: 12px; "><span style="font-family: Arial; "> * the key used for localization</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #7f9fbf"><span style="font-size: 12px; "><span style="font-family: Arial; "> * @param args</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #3f5fbf"><span style="font-size: 12px; "><span style="font-family: Arial; "> * optional arguments</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> */</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> public void trace(Enum<?> key, Object... args) {</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> if (!logger.isTraceEnabled()) {</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> return;</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> }</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> String translatedMsg = imc.getMessage(key, args);</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> MessageParameterObj mpo = new MessageParameterObj(key, args);</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> String msg = " [" + key.getClass().getName() + key.toString() + "] " + translatedMsg;</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #0000c0"><span style="font-size: 12px; "><span style="font-family: Arial; "> if (instanceofLAL) {</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> ((LocationAwareLogger) logger).log(LOCALIZED, FQCN,</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> LocationAwareLogger.TRACE_INT, msg, null);</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> } else {</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> logger.trace(LOCALIZED, msg, mpo);</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> }</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> }</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; min-height: 15.0px"><span style="font-size: 12px; "><span style="font-family: Arial; "><br /></span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #3f5fbf"><span style="font-size: 12px; "><span style="font-family: Arial; "> /**</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #3f5fbf"><span style="font-size: 12px; "><span style="font-family: Arial; "> * Log a localized message at the DEBUG level.</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> * </span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #7f9fbf"><span style="font-size: 12px; "><span style="font-family: Arial; "> * @param key</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #3f5fbf"><span style="font-size: 12px; "><span style="font-family: Arial; "> * the key used for localization</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #7f9fbf"><span style="font-size: 12px; "><span style="font-family: Arial; "> * @param args</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #3f5fbf"><span style="font-size: 12px; "><span style="font-family: Arial; "> * optional arguments</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> */</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> public void debug(Enum<?> key, Object... args) {</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> if (!logger.isDebugEnabled()) {</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> return;</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> }</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> String translatedMsg = imc.getMessage(key, args);</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> MessageParameterObj mpo = new MessageParameterObj(key, args);</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> String msg = " [" + key.getClass().getName() + key.toString() + "] " + translatedMsg;</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; min-height: 15.0px"><span style="font-size: 12px; "><span style="font-family: Arial; "><br /></span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #0000c0"><span style="font-size: 12px; "><span style="font-family: Arial; "> if (instanceofLAL) {</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> ((LocationAwareLogger) logger).log(LOCALIZED, FQCN,</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> LocationAwareLogger.DEBUG_INT, msg, null);</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> } else {</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> logger.debug(LOCALIZED, msg, mpo);</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> }</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> }</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; min-height: 15.0px"><span style="font-size: 12px; "><span style="font-family: Arial; "><br /></span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #3f5fbf"><span style="font-size: 12px; "><span style="font-family: Arial; "> /**</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #3f5fbf"><span style="font-size: 12px; "><span style="font-family: Arial; "> * Log a localized message at the INFO level.</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> * </span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #7f9fbf"><span style="font-size: 12px; "><span style="font-family: Arial; "> * @param key</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #3f5fbf"><span style="font-size: 12px; "><span style="font-family: Arial; "> * the key used for localization</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #7f9fbf"><span style="font-size: 12px; "><span style="font-family: Arial; "> * @param args</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #3f5fbf"><span style="font-size: 12px; "><span style="font-family: Arial; "> * optional arguments</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> */</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> public void info(Enum<?> key, Object... args) {</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> if (!logger.isInfoEnabled()) {</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> return;</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> }</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> String translatedMsg = imc.getMessage(key, args);</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> MessageParameterObj mpo = new MessageParameterObj(key, args);</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> String msg = " [" + key.getClass().getName() + key.toString() + "] " + translatedMsg;</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; min-height: 15.0px"><span style="font-size: 12px; "><span style="font-family: Arial; "><br /></span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #0000c0"><span style="font-size: 12px; "><span style="font-family: Arial; "> if (instanceofLAL) {</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> ((LocationAwareLogger) logger).log(LOCALIZED, FQCN,</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> LocationAwareLogger.INFO_INT, msg, null);</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> } else {</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> logger.info(LOCALIZED, msg, mpo);</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> }</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> }</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; min-height: 15.0px"><span style="font-size: 12px; "><span style="font-family: Arial; "><br /></span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #3f5fbf"><span style="font-size: 12px; "><span style="font-family: Arial; "> /**</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #3f5fbf"><span style="font-size: 12px; "><span style="font-family: Arial; "> * Log a localized message at the WARN level.</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> * </span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #7f9fbf"><span style="font-size: 12px; "><span style="font-family: Arial; "> * @param key</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #3f5fbf"><span style="font-size: 12px; "><span style="font-family: Arial; "> * the key used for localization</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #7f9fbf"><span style="font-size: 12px; "><span style="font-family: Arial; "> * @param args</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #3f5fbf"><span style="font-size: 12px; "><span style="font-family: Arial; "> * optional arguments</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> */</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> public void warn(Enum<?> key, Object... args) {</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> if (!logger.isWarnEnabled()) {</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> return;</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> }</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> String translatedMsg = imc.getMessage(key, args);</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> MessageParameterObj mpo = new MessageParameterObj(key, args);</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> String msg = " [" + key.getClass().getName() + key.toString() + "] " + translatedMsg;</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; min-height: 15.0px"><span style="font-size: 12px; "><span style="font-family: Arial; "><br /></span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #0000c0"><span style="font-size: 12px; "><span style="font-family: Arial; "> if (instanceofLAL) {</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> ((LocationAwareLogger) logger).log(LOCALIZED, FQCN,</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> LocationAwareLogger.WARN_INT, msg, null);</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> } else {</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> logger.warn(LOCALIZED, msg, mpo);</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> }</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> }</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; min-height: 15.0px"><span style="font-size: 12px; "><span style="font-family: Arial; "><br /></span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #3f5fbf"><span style="font-size: 12px; "><span style="font-family: Arial; "> /**</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #3f5fbf"><span style="font-size: 12px; "><span style="font-family: Arial; "> * Log a localized message at the ERROR level.</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> * </span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #7f9fbf"><span style="font-size: 12px; "><span style="font-family: Arial; "> * @param key</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #3f5fbf"><span style="font-size: 12px; "><span style="font-family: Arial; "> * the key used for localization</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #7f9fbf"><span style="font-size: 12px; "><span style="font-family: Arial; "> * @param args</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #3f5fbf"><span style="font-size: 12px; "><span style="font-family: Arial; "> * optional arguments</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> */</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> public void error(Enum<?> key, Object... args) {</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> if (!logger.isErrorEnabled()) {</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> return;</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> }</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> String translatedMsg = imc.getMessage(key, args);</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> MessageParameterObj mpo = new MessageParameterObj(key, args);</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> String msg = " [" + key.getClass().getName() + key.toString() + "] " + translatedMsg;</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; min-height: 15.0px"><span style="font-size: 12px; "><span style="font-family: Arial; "><br /></span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; color: #0000c0"><span style="font-size: 12px; "><span style="font-family: Arial; "> if (instanceofLAL) {</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> ((LocationAwareLogger) logger).log(LOCALIZED, FQCN,</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> LocationAwareLogger.ERROR_INT, msg, null);</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> } else {</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> logger.error(LOCALIZED, msg, mpo);</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> }</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; "> }</span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco; min-height: 15.0px"><span style="font-size: 12px; "><span style="font-family: Arial; "><br /></span></span></p><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Monaco"><span style="font-size: 12px; "><span style="font-family: Arial; ">}</span></span> </p><blockquote style="border-left: 2px solid #325FBA; padding-left: 5px;margin-left:5px;"><p> </p> </blockquote>
</body>
</html>