Hello Mohammed,
Could you post a copy of your current logback.xml file? It'll be easier
to talk about multi-step configuration once we have your logback.xml file.
Cheers,
On 05/07/2011 10:30 PM, BAKHTI Mohammed wrote:
Thanks
I have already think about something like this but it's not really nice,
(if in the future i need to change smething i have to make changes in
java files)
No one know about how to "exclude component from the default
configuration" or "multi-step configuration" as slf4j doccumentation said ?
In slf4j they said :
The only way to obtain output from the listed loggers, is to isolate the
components invoking these loggers and to exclude them from the default
configuration. Both logback and log4j allow multi-step configuration. It
follows that the problematic components should be configured in a second
step separate from default configuration.
------------------------------------------------------------------------
To: [email protected]; [email protected]
From: [email protected]
Subject: Re: [logback-user] Problem with Logback.XML
Date: Mon, 4 Jul 2011 11:08:05 -0400
The way I got around it with my filter was to create another class with
a static method that the filter called. The other class had a logger
instantiated and took care of the logging for the filter.
Sent from my Verizon Wireless Phone
----- Reply message -----
From: "BAKHTI Mohammed" <[email protected]>
Date: Mon, Jul 4, 2011 9:47 am
Subject: [logback-user] Problem with Logback.XML
To: <[email protected]>, <[email protected]>
Thanks for the replay :
so how can i deal with this ?
In slf4j they said :
The only way to obtain output from the listed loggers, is to isolate the
components invoking these loggers and to exclude them from the default
configuration. Both logback and log4j allow multi-step configuration. It
follows that the problematic components should be configured in a second
step separate from default configuration.
But i don't figure how ? what really i need to do.
Thansk again for any help
------------------------------------------------------------------------
To: [email protected]; [email protected]
From: [email protected]
Subject: Re: [logback-user] Problème with Logback.XML
Date: Mon, 4 Jul 2011 08:52:24 -0400
If you instantiate a logger in a filter class you'll have the same
problem. The message is telling you that you can't use a logger in part
of Logback's init.
Sent from my Verizon Wireless Phone
----- Reply message -----
From: "BAKHTI Mohammed" <[email protected]>
Date: Mon, Jul 4, 2011 3:31 am
Subject: [logback-user] Problème with Logback.XML
To: <[email protected]>
Hello,
I just made an API abstraction above logback in order to add specific
functions in this api i haveall logback functions (juste overrided with
no changes) and add some other functions (with specific signature):
I created then a file appender and a JMS appender in logback.xml
(nothing special)
I am using activemq for jms MOM.
The problem is then : when a run a test class with some methodes
invocation i see this message :
SLF4J: The following loggers will not work becasue they were created
SLF4J: during the default configuration phase of the underlying logging
system.
SLF4J: See also http://www.slf4j.org/codes.html#substituteLogger
SLF4J: org.apache.activemq.ActiveMQPrefetchPolicy
SLF4J: org.apache.activemq.jndi.ReadOnlyContext
SLF4J: org.apache.activemq.transport.tcp.TcpTransportFactory
SLF4J: org.apache.activemq.util.ServiceSupport
All user logs are logged as expected but i dont see any of activemq (or
other framework) logs .
i have read the information in slf4j url but don't understund what they
mean and how to correct this problem in logback .
Thanks for any help
_______________________________________________
Logback-user mailing list
[email protected]
http://qos.ch/mailman/listinfo/logback-user