<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'><div dir='ltr'>
<br><br><div><hr id="stopSpelling">From: onlymed@hotmail.com<br>To: logback-user@qos.ch; ceki@qos.ch<br>Subject: RE: [logback-user] Problem with Logback.XML<br>Date: Wed, 6 Jul 2011 14:56:25 +0200<br><br>

<meta http-equiv="Content-Type" content="text/html; charset=unicode">
<meta name="Generator" content="Microsoft SafeHTML">
<style>
.ExternalClass .ecxhmmessage P
{padding:0px;}
.ExternalClass body.ecxhmmessage
{font-size:10pt;font-family:Tahoma;}

</style>

<div dir="ltr">
<br>Yes here is my logback.xml <br><br><br><br>&lt;configuration&gt;<br><br>&nbsp;&nbsp;&nbsp; &lt;property name="InitialContextFactoryName" value="org.apache.activemq.jndi.ActiveMQInitialContextFactory" /&gt;<br>&nbsp;&nbsp;&nbsp; &lt;property name="TopicConnectionFactoryBindingName" value="ConnectionFactory" /&gt;<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &lt;property file="src/main/resources/MyLogger.properties" /&gt;<br>&nbsp;&nbsp;&nbsp; <br>&lt;!--************************************************************************* --&gt;<br>&lt;!-- ****************************&nbsp;&nbsp; Appenders&nbsp;&nbsp; ******************************--&gt;<br>&lt;!--************************************************************************* --&gt;<br>&nbsp;&nbsp;&nbsp; &lt;appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;encoder&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;pattern&gt;%date{dd/mm/yyyy HH:mm:ss.SSS} %-5level %X{userId} %X{fluxId} ${MyLogger.application.name} %X{actionPath} %X{code} %X{actionId} %message %n&lt;/pattern&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/encoder&gt;<br>&nbsp;&nbsp;&nbsp; &lt;/appender&gt;<br><br>&nbsp;&nbsp;&nbsp; &lt;appender name="JMSTrace" class="ch.qos.logback.classic.net.JMSTopicAppender"&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;InitialContextFactoryName&gt;${InitialContextFactoryName}&lt;/InitialContextFactoryName&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;ProviderURL&gt;${MyLogger.jms.brokerURL}&lt;/ProviderURL&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;TopicConnectionFactoryBindingName&gt;${TopicConnectionFactoryBindingName}&lt;/TopicConnectionFactoryBindingName&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;TopicBindingName&gt;dynamicTopics/${MyLogger.jms.topic}&lt;/TopicBindingName&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;filter class="ch.qos.logback.core.filter.EvaluatorFilter"&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;evaluator&gt; &lt;!-- defaults to type ch.qos.logback.classic.boolex.JaninoEventEvaluator --&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;expression&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; (Level.ERROR.isGreaterOrEqual(event.getLevel()))<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; &lt;/expression&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/evaluator&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;OnMismatch&gt;DENY&lt;/OnMismatch&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;OnMatch&gt;NEUTRAL&lt;/OnMatch&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/filter&gt;<br>&nbsp;&nbsp;&nbsp; &lt;/appender&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &lt;!--Daily rolling ERROR_FILE file appender --&gt;<br>&nbsp;&nbsp;&nbsp; &lt;appender name="ERROR_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;FileNamePattern&gt;${MyLogger.log.directory}/${MyLogger.application.name}_error.%exp{%d{yyyy-MM-dd_HHmm}}.log&lt;/FileNamePattern&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;FileNamePattern&gt;${MyLogger.log.directory}/${MyLogger.application.name}_error.%d{${MyLogger.log.rotation}}.log.zip&lt;/FileNamePattern&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/rollingPolicy&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;encoder&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;pattern&gt;%date{dd/mm/yyyy HH:mm:ss.SSS} %-5level %X{userId} %X{fluxId} ${MyLogger.application.name} %X{actionPath} %X{code} %X{actionId} %message %n%replace(%caller){'Caller..', ''}&lt;/pattern&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/encoder&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;filter class="ch.qos.logback.core.filter.EvaluatorFilter"&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;evaluator&gt; &lt;!-- defaults to type ch.qos.logback.classic.boolex.JaninoEventEvaluator --&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;expression&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; (event.getLevel().isGreaterOrEqual(Level.WARN)) <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/expression&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/evaluator&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;OnMismatch&gt;DENY&lt;/OnMismatch&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;OnMatch&gt;NEUTRAL&lt;/OnMatch&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/filter&gt;<br>&nbsp;&nbsp;&nbsp; &lt;/appender&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &lt;!--Daily rolling AUDIT_FILE file appender --&gt;<br>&nbsp;&nbsp;&nbsp; &lt;appender name="AUDIT_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;FileNamePattern&gt;${MyLogger.log.directory}/${MyLogger.application.name}_audit.%exp{%d{yyyy-MM-dd_HHmm}}.log&lt;/FileNamePattern&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;FileNamePattern&gt;${MyLogger.log.directory}/${MyLogger.application.name}_audit.%d{${MyLogger.log.rotation}}.log.zip&lt;/FileNamePattern&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/rollingPolicy&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;encoder&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;pattern&gt;%date{dd/mm/yyyy HH:mm:ss.SSS} %X{msgId} %-5level %X{userId} %X{fluxId} ${MyLogger.application.name} %X{actionPath} %X{code} %X{actionId} %message %n&lt;/pattern&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/encoder&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;filter class="ch.qos.logback.core.filter.EvaluatorFilter"&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;evaluator&gt; &lt;!-- defaults to type ch.qos.logback.classic.boolex.JaninoEventEvaluator --&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;expression&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; (Level.INFO.equals(event.getLevel())) <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/expression&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/evaluator&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;OnMismatch&gt;DENY&lt;/OnMismatch&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;OnMatch&gt;NEUTRAL&lt;/OnMatch&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/filter&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &lt;/appender&gt;<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &lt;!--Daily rolling file DIAGNOSTIC_FILE appender --&gt;<br>&nbsp;&nbsp;&nbsp; &lt;appender name="DIAGNOSTIC_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;FileNamePattern&gt;${MyLogger.log.directory}/${MyLogger.application.name}_diagnostic.log.%exp{%d{yyyy-MM-dd_HHmm}}.log&lt;/FileNamePattern&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;FileNamePattern&gt;${MyLogger.log.directory}/${MyLogger.application.name}_diagnostic.%d{${MyLogger.log.rotation}}.log.zip&lt;/FileNamePattern&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/rollingPolicy&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;encoder&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;pattern&gt;%date{dd/mm/yyyy HH:mm:ss.SSS} %-5level %X{userId} %X{fluxId} ${MyLogger.application.name} %X{actionPath} %X{code} %X{actionId} %message %n&lt;/pattern&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/encoder&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;filter class="ch.qos.logback.core.filter.EvaluatorFilter"&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;evaluator&gt; &lt;!-- defaults to type ch.qos.logback.classic.boolex.JaninoEventEvaluator --&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;expression&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; (Level.ERROR.isGreaterOrEqual(event.getLevel())) <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/expression&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/evaluator&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;OnMismatch&gt;DENY&lt;/OnMismatch&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;OnMatch&gt;NEUTRAL&lt;/OnMatch&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;/filter&gt;<br>&nbsp;&nbsp;&nbsp; &lt;/appender&gt;<br>&nbsp;&nbsp;&nbsp;&nbsp; <br>&lt;!--*********************************************************************** --&gt;<br>&lt;!-- ****************************&nbsp;&nbsp; Loggers&nbsp;&nbsp; ******************************--&gt;<br>&lt;!--*********************************************************************** --&gt;<br>&nbsp;&nbsp;&nbsp; &lt;logger name="entr.logger.trace"&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;level value="trace" /&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;appender-ref ref="JMSTrace" /&gt;<br>&nbsp;&nbsp;&nbsp; &lt;/logger&gt;<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &lt;logger name="entr.logger.application"&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;level value="trace" /&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;appender-ref ref="STDOUT" /&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;appender-ref ref="AUDIT_FILE" /&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;appender-ref ref="ERROR_FILE" /&gt;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &lt;appender-ref ref="DIAGNOSTIC_FILE" /&gt;<br>&nbsp;&nbsp;&nbsp; &lt;/logger&gt;<br>&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; &lt;/configuration&gt;<br><br><br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; //this one is used to print application logs (all the standard logback functions : info, debug...)<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; applicationLogger = (Logger) LoggerFactory.getLogger("entr.logger.application");<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // this one is used to send my own log functions : mytrace(field1, field2...) to jms <br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; sentinelleLogger = (Logger) LoggerFactory.getLogger("entr.logger.trace");<br><br>and the idea is : the user has juste to use my static class the same way as logback .&nbsp; MyLogger.trace()..... or MyLogger.Mytrace(...)<br><br>Thanks for any help <br><br><div>&gt; Date: Wed, 6 Jul 2011 12:02:01 +0200<br>&gt; From: ceki@qos.ch<br>&gt; To: logback-user@qos.ch<br>&gt; Subject: Re: [logback-user] Problem with Logback.XML<br>&gt; <br>&gt; Hello Mohammed,<br>&gt; <br>&gt; Could you post a copy of your current logback.xml file? It'll be easier <br>&gt; to talk about multi-step configuration once we have your logback.xml file.<br>&gt; <br>&gt; Cheers,<br>&gt; <br>&gt; On 05/07/2011 10:30 PM, BAKHTI Mohammed wrote:<br>&gt; &gt; Thanks<br>&gt; &gt;<br>&gt; &gt; I have already think about something like this but it's not really nice,<br>&gt; &gt; (if in the future i need to change smething i have to make changes in<br>&gt; &gt; java files)<br>&gt; &gt;<br>&gt; &gt; No one know about how to "exclude component from the default<br>&gt; &gt; configuration" or "multi-step configuration" as slf4j doccumentation said ?<br>&gt; &gt;<br>&gt; &gt; In slf4j they said :<br>&gt; &gt; The only way to obtain output from the listed loggers, is to isolate the<br>&gt; &gt; components invoking these loggers and to exclude them from the default<br>&gt; &gt; configuration. Both logback and log4j allow multi-step configuration. It<br>&gt; &gt; follows that the problematic components should be configured in a second<br>&gt; &gt; step separate from default configuration.<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt; ------------------------------------------------------------------------<br>&gt; &gt; To: onlymed@hotmail.com; logback-user@qos.ch<br>&gt; &gt; From: djt69@comcast.net<br>&gt; &gt; Subject: Re: [logback-user] Problem with Logback.XML<br>&gt; &gt; Date: Mon, 4 Jul 2011 11:08:05 -0400<br>&gt; &gt;<br>&gt; &gt; The way I got around it with my filter was to create another class with<br>&gt; &gt; a static method that the filter called. The other class had a logger<br>&gt; &gt; instantiated and took care of the logging for the filter.<br>&gt; &gt;<br>&gt; &gt; Sent from my Verizon Wireless Phone<br>&gt; &gt;<br>&gt; &gt; ----- Reply message -----<br>&gt; &gt; From: "BAKHTI Mohammed" &lt;onlymed@hotmail.com&gt;<br>&gt; &gt; Date: Mon, Jul 4, 2011 9:47 am<br>&gt; &gt; Subject: [logback-user] Problem with Logback.XML<br>&gt; &gt; To: &lt;djt69@comcast.net&gt;, &lt;logback-user@qos.ch&gt;<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt; Thanks for the replay :<br>&gt; &gt;<br>&gt; &gt; so how can i deal with this ?<br>&gt; &gt;<br>&gt; &gt; In slf4j they said :<br>&gt; &gt; The only way to obtain output from the listed loggers, is to isolate the<br>&gt; &gt; components invoking these loggers and to exclude them from the default<br>&gt; &gt; configuration. Both logback and log4j allow multi-step configuration. It<br>&gt; &gt; follows that the problematic components should be configured in a second<br>&gt; &gt; step separate from default configuration.<br>&gt; &gt;<br>&gt; &gt; But i don't figure how ? what really i need to do.<br>&gt; &gt;<br>&gt; &gt; Thansk again for any help<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt; ------------------------------------------------------------------------<br>&gt; &gt; To: onlymed@hotmail.com; logback-user@qos.ch<br>&gt; &gt; From: djt69@comcast.net<br>&gt; &gt; Subject: Re: [logback-user] Problème with Logback.XML<br>&gt; &gt; Date: Mon, 4 Jul 2011 08:52:24 -0400<br>&gt; &gt;<br>&gt; &gt; If you instantiate a logger in a filter class you'll have the same<br>&gt; &gt; problem. The message is telling you that you can't use a logger in part<br>&gt; &gt; of Logback's init.<br>&gt; &gt;<br>&gt; &gt; Sent from my Verizon Wireless Phone<br>&gt; &gt;<br>&gt; &gt; ----- Reply message -----<br>&gt; &gt; From: "BAKHTI Mohammed" &lt;onlymed@hotmail.com&gt;<br>&gt; &gt; Date: Mon, Jul 4, 2011 3:31 am<br>&gt; &gt; Subject: [logback-user] Problème with Logback.XML<br>&gt; &gt; To: &lt;logback-user@qos.ch&gt;<br>&gt; &gt;<br>&gt; &gt; Hello,<br>&gt; &gt;<br>&gt; &gt; I just made an API abstraction above logback in order to add specific<br>&gt; &gt; functions in this api i haveall logback functions (juste overrided with<br>&gt; &gt; no changes) and add some other functions (with specific signature):<br>&gt; &gt;<br>&gt; &gt; I created then a file appender and a JMS appender in logback.xml<br>&gt; &gt; (nothing special)<br>&gt; &gt;<br>&gt; &gt; I am using activemq for jms MOM.<br>&gt; &gt;<br>&gt; &gt; The problem is then : when a run a test class with some methodes<br>&gt; &gt; invocation i see this message :<br>&gt; &gt;<br>&gt; &gt; SLF4J: The following loggers will not work becasue they were created<br>&gt; &gt; SLF4J: during the default configuration phase of the underlying logging<br>&gt; &gt; system.<br>&gt; &gt; SLF4J: See also http://www.slf4j.org/codes.html#substituteLogger<br>&gt; &gt; SLF4J: org.apache.activemq.ActiveMQPrefetchPolicy<br>&gt; &gt; SLF4J: org.apache.activemq.jndi.ReadOnlyContext<br>&gt; &gt; SLF4J: org.apache.activemq.transport.tcp.TcpTransportFactory<br>&gt; &gt; SLF4J: org.apache.activemq.util.ServiceSupport<br>&gt; &gt;<br>&gt; &gt; All user logs are logged as expected but i dont see any of activemq (or<br>&gt; &gt; other framework) logs .<br>&gt; &gt;<br>&gt; &gt; i have read the information in slf4j url but don't understund what they<br>&gt; &gt; mean and how to correct this problem in logback .<br>&gt; &gt;<br>&gt; &gt; Thanks for any help<br>&gt; &gt;<br>&gt; &gt;<br>&gt; &gt;<br>&gt; _______________________________________________<br>&gt; Logback-user mailing list<br>&gt; Logback-user@qos.ch<br>&gt; http://qos.ch/mailman/listinfo/logback-user<br></div>                                               </div></div>                                               </div></body>
</html>