Then I suggest checking out the log4j debug output to determine
exactly what is configuring it.

On Feb 3, 2008 11:34 PM, Dvrm Chowdary <[EMAIL PROTECTED]> wrote:
>
> Hi,
> I tried that, but it didn't work. I tried disabling the console appenders in
> jboss-log4j.xml too, but in vain.
> I see duplicates on the console, but i dont find any in the log files.Only
> the loggers in threads are being duplicated.
>
> Regards.
>
>
>
>
>
> "James A. N. Stauffer" <[EMAIL PROTECTED]>
>
> 02/01/2008 09:44 PM
>
>
>
>
> To Dvrm Chowdary/CHE/[EMAIL PROTECTED]
>
> cc
>
> Subject Re: log4j : How to avoid duplicate logmessages in a multithreaded
> application?
>
>
>
>
>
>
> It is possible that the container is causing DOMConfigurator to be
>  called multiple times?  Add  debug="true" to the log4j:configuration
>  XML element and it will print info each time log4j is configured.
>
>  On Feb 1, 2008 3:09 AM, Dvrm Chowdary <[EMAIL PROTECTED]> wrote:
>  >
>  > Hi,
>  >         DOMConfigurator is being called only at the application starup.
>  >          I noticed that The number of duplicates of each logger message
>  > (those inside threads) keeps on increasing if i leave my application
> still.
>  > I am using many queues configured in the jboss .Has it got to do anything
>  > with this weird behaviour?
>  >
>  > Regards.
>  >
>  >
>  >
>  >  "James A. N. Stauffer" <[EMAIL PROTECTED]>
>  >
>  > 01/31/2008 08:44 PM
>  >
>  >
>  > To Dvrm Chowdary/CHE/[EMAIL PROTECTED]
>  >
>  > cc
>  >
>  > Subject Re: log4j : How to avoid duplicate logmessages in a multithreaded
>  > application?
>  >
>  >
>  >
>  >
>  >
>  >
>  > How often is DOMConfigurator called?  Are you sure it is called once
>  >  once in the life cycle of the application?
>  >
>  >  On Jan 30, 2008 11:26 PM,  <[EMAIL PROTECTED]> wrote:
>  >  > Hi James,
>  >  > Thanks for the reply.I am configuring log4j using a DOMConfigurator as
>  > shown below. I don't know what exactly the configure method does though.
>  >  >
> DOMConfigurator.configure(prop.getProperty("Log4jConfig"));
>  >  > Is something wrong with it??
>  >  > Also the number of duplicate logger messages I see is constant(around
>  > 8-9) for each logger(only those inside threads). I have 8 appenders in my
>  > log4j-config.xml too. Are they adding up?
>  >  >
>  >  > Regards.
>  >  >
>  >  >
>  >  > James A. N. Stauffer wrote:
>  >  > >
>  >  > > My guess is that log4j is being configured multiple times.  Each
> time
>  >  > > log4j is configured, the new configuration is added to the current
>  >  > > configuration.
>  >  > >
>  >  > > How are you configuring log4j?
>  >  > >
>  >  > > On Jan 30, 2008 3:00 AM, dvrmc <[EMAIL PROTECTED]> wrote:
>  >  > >>
>  >  > >> Hi,
>  >  > >> I m using log4j for my heavily multithreaded JAVA application.
> After
>  > my
>  >  > >> application comes up, a few minutes later , I find many duplicate
>  > logger
>  >  > >> messages on the console(only logger messages in threads are being
>  >  > >> displayed
>  >  > >> 8-9 times each). Is it that my application being multithreaded or
> is
>  >  > >> there
>  >  > >> something wrong with my configuration file?
>  >  > >>
>  >  > >> My log4j-config.xml is as below:-
>  >  > >>
>  >  > >> <?xml version="1.0" encoding="UTF-8"?>
>  >  > >> <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
>  >  > >>
>  >  > >> <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/";
>  >  > >>                      configDebug="true">
>  >  > >>
>  >  > >>         <appender name="ASYNC"
> class="org.apache.log4j.AsyncAppender"
>  >  > >> additivity="false">
>  >  > >>                 <appender-ref ref="TEMP"/>
>  >  > >>                 <appender-ref ref="CONSOLE"/>
>  >  > >>                 <appender-ref ref="TRACE"/>
>  >  > >>                 <appender-ref ref="DEBUG"/>
>  >  > >>                 <appender-ref ref="INFO"/>
>  >  > >>                 <appender-ref ref="WARN"/>
>  >  > >>                 <appender-ref ref="ERROR"/>
>  >  > >>                 <appender-ref ref="FATAL"/>
>  >  > >>         </appender>
>  >  > >>
>  >  > >>         <appender name="CONSOLE"
>  >  > >> class="org.apache.log4j.ConsoleAppender">
>  >  > >>                 <!-- param name="ImmediateFlush" value="true"/-->
>  >  > >>                 <layout class="org.apache.log4j.PatternLayout">
>  >  > >>                      <!-- param name="ConversionPattern" > >> >
> value="%d %-5p [%t] %C %A (%F:%L) - %m%n"/-->
>  >  > >>                 </layout>
>  >  > >>         </appender>
>  >  > >>
>  >  > >>
>  >  > >>         <appender name="TEMP"
> class="org.apache.log4j.FileAppender">
>  >  > >>
>  >  > >>                 <layout class="org.apache.log4j.PatternLayout">
>  >  > >>
>  >  > >>                 </layout>
>  >  > >>         </appender>
>  >  > >>
>  >  > >>         <appender name="TRACE"
> class="org.apache.log4j.FileAppender">
>  >  > >>
>  >  > >>
>  >  > >>         <layout class="org.apache.log4j.PatternLayout">
>  >  > >>
>  >  > >>                 </layout>
>  >  > >>         </appender>
>  >  > >>
>  >  > >>         <appender name="DEBUG"
> class="org.apache.log4j.FileAppender">
>  >  > >>
>  >  > >>
>  >  > >>         <layout class="org.apache.log4j.PatternLayout">
>  >  > >>
>  >  > >>                 </layout>
>  >  > >>         </appender>
>  >  > >>
>  >  > >>         <appender name="INFO"
> class="org.apache.log4j.FileAppender">
>  >  > >>
>  >  > >>         <layout class="org.apache.log4j.PatternLayout">
>  >  > >>
>  >  > >>                 </layout>
>  >  > >>
>  >  > >>                 <filter
>  > class="org.apache.log4j.varia.LevelMatchFilter">
>  >  > >>
>  >  > >>                 </filter>
>  >  > >>
>  >  > >>         <filter class="org.apache.log4j.varia.DenyAllFilter"/>
>  >  > >>         </appender>
>  >  > >>
>  >  > >>         <appender name="WARN"
> class="org.apache.log4j.FileAppender">
>  >  > >>
>  >  > >>         <layout class="org.apache.log4j.PatternLayout">
>  >  > >>
>  >  > >>                 </layout>
>  >  > >>
>  >  > >>                 <filter
>  > class="org.apache.log4j.varia.LevelMatchFilter">
>  >  > >>
>  >  > >>             </filter>
>  >  > >>         <filter class="org.apache.log4j.varia.DenyAllFilter"/>
>  >  > >>         </appender>
>  >  > >>
>  >  > >>         <appender name="ERROR"
> class="org.apache.log4j.FileAppender">
>  >  > >>
>  >  > >>         <layout class="org.apache.log4j.PatternLayout">
>  >  > >>
>  >  > >>                 </layout>
>  >  > >>
>  >  > >>                 <filter
>  > class="org.apache.log4j.varia.LevelMatchFilter">
>  >  > >>
>  >  > >>             </filter>
>  >  > >>         <filter class="org.apache.log4j.varia.DenyAllFilter"/>
>  >  > >>         </appender>
>  >  > >>
>  >  > >>         <appender name="FATAL"
> class="org.apache.log4j.FileAppender">
>  >  > >>
>  >  > >>         <layout class="org.apache.log4j.PatternLayout">
>  >  > >>
>  >  > >>                 </layout>
>  >  > >>
>  >  > >>                 <filter
>  > class="org.apache.log4j.varia.LevelMatchFilter">
>  >  > >>
>  >  > >>             </filter>
>  >  > >>         <filter class="org.apache.log4j.varia.DenyAllFilter"/>
>  >  > >>         </appender>
>  >  > >>
>  >  > >>         <appender name="SLCS"
> class="org.apache.log4j.FileAppender">
>  >  > >>
>  >  > >>                 <layout class="org.apache.log4j.PatternLayout">
>  >  > >>
>  >  > >>                 </layout>
>  >  > >>         </appender>
>  >  > >>
>  >  > >>         <category name="com.aircell.abs.acpu.softwareloadconfig"
>  >  > >> additivity="false">
>  >  > >>       <level value="debug"/>
>  >  > >>         <appender-ref ref="SLCS"/>
>  >  > >>       </category>
>  >  > >>
>  >  > >>         <root>
>  >  > >>                 <priority value="info"/>
>  >  > >>                 <appender-ref ref="ASYNC"/>
>  >  > >>         </root>
>  >  > >> </log4j:configuration>
>  >  > >>
>  >  > >>
>  >  > >>
>  >  > >> Regards.
>  >  > >> --
>  >  > >> View this message in context:
>  >  > >>
>  >
> http://www.nabble.com/log4j-%3A-How-to-avoid-duplicate-logmessages-in-a-multithreaded-application--tp15177220p15177220.html
>  >  > >> Sent from the Log4j - Users mailing list archive at Nabble.com.
>  >  > >>
>  >  > >>
>  >  > >>
> ---------------------------------------------------------------------
>  >  > >> To unsubscribe, e-mail: [EMAIL PROTECTED]
>  >  > >> For additional commands, e-mail: [EMAIL PROTECTED]
>  >  > >>
>  >  > >>
>  >  > >
>  >  > >
>  >  > >
>  >  > > --
>  >  > > James A. N. Stauffer        http://www.geocities.com/stauffer_james/
>  >  > > Are you good? Take the test at http://www.livingwaters.com/good/
>  >  > >
>  >  > >
> ---------------------------------------------------------------------
>  >  > > To unsubscribe, e-mail: [EMAIL PROTECTED]
>  >  > > For additional commands, e-mail: [EMAIL PROTECTED]
>  >  > >
>  >  > >
>  >  > >
>  >  > Quoted from:
>  >  >
>  >
> http://www.nabble.com/log4j-%3A-How-to-avoid-duplicate-logmessages-in-a-multithreaded-application--tp15177220p15185627.html
>  >  >
>  >  >
>  >
>  >
>  >
>  >  --
>  >  James A. N. Stauffer        http://www.geocities.com/stauffer_james/
>  >  Are you good? Take the test at http://www.livingwaters.com/good/
>  >
>  >
>  >
>  >  ***********************  Aricent-Unclassified   ***********************
>  > "DISCLAIMER: This message is proprietary to Aricent and is intended
> solely
>  > for the use of
>  > the individual to whom it is addressed. It may contain privileged or
>  > confidential information and should not be
>  > circulated or used for any purpose other than for what it is intended. If
>  > you have received this message in error,
>  > please notify the originator immediately. If you are not the intended
>  > recipient, you are notified that you are strictly
>  > prohibited from using, copying, altering, or disclosing the contents of
> this
>  > message. Aricent accepts no responsibility for
>  > loss or damage arising from the use of the information transmitted by
> this
>  > email including damage from virus."
>  >
>  >
>
>
>
>  --
>  James A. N. Stauffer        http://www.geocities.com/stauffer_james/
>  Are you good? Take the test at http://www.livingwaters.com/good/
>
>
>
>  ***********************  Aricent-Unclassified   ***********************
> "DISCLAIMER: This message is proprietary to Aricent and is intended solely
> for the use of
> the individual to whom it is addressed. It may contain privileged or
> confidential information and should not be
> circulated or used for any purpose other than for what it is intended. If
> you have received this message in error,
> please notify the originator immediately. If you are not the intended
> recipient, you are notified that you are strictly
> prohibited from using, copying, altering, or disclosing the contents of this
> message. Aricent accepts no responsibility for
> loss or damage arising from the use of the information transmitted by this
> email including damage from virus."
>
>



-- 
James A. N. Stauffer        http://www.geocities.com/stauffer_james/
Are you good? Take the test at http://www.livingwaters.com/good/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to