<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel about="http://blog.gmane.org/gmane.comp.jakarta.log4j.user">
    <title>gmane.comp.jakarta.log4j.user</title>
    <link>http://blog.gmane.org/gmane.comp.jakarta.log4j.user</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.jakarta.log4j.user/17337"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.jakarta.log4j.user/17334"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.jakarta.log4j.user/17332"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.jakarta.log4j.user/17319"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.jakarta.log4j.user/17317"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.jakarta.log4j.user/17308"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.jakarta.log4j.user/17306"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.jakarta.log4j.user/17302"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.jakarta.log4j.user/17291"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.jakarta.log4j.user/17288"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.jakarta.log4j.user/17287"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.jakarta.log4j.user/17286"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.jakarta.log4j.user/17283"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.jakarta.log4j.user/17279"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.jakarta.log4j.user/17277"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.jakarta.log4j.user/17269"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.jakarta.log4j.user/17267"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.jakarta.log4j.user/17261"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.jakarta.log4j.user/17258"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.jakarta.log4j.user/17256"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://comments.gmane.org/gmane.comp.jakarta.log4j.user/17337">
    <title>Logfiles containing 'java' as methodname for %M instead of real method name</title>
    <link>http://comments.gmane.org/gmane.comp.jakarta.log4j.user/17337</link>
    <description>Hello,

in the ...layout.ConversionPattern of a DailyRollingFileAppender the %M 
parameter is defined to output the name of the method where the logging was 
triggered. In some logfiles instead of the real method name the entry 'java' 
is found. What may be the reason for this behaviour and how to achieve the 
output of the name of the triggering method?

Thomas Wiedmann 
</description>
    <dc:creator>Thomas Wiedmann</dc:creator>
    <dc:date>2008-09-06T14:11:40</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.jakarta.log4j.user/17334">
    <title>CLOB datatype column usage with JDBCPlus jdbc appender</title>
    <link>http://comments.gmane.org/gmane.comp.jakarta.log4j.user/17334</link>
    <description>Hi,
I am using JDBCPlus (http://www.dankomannhaupt.de/projects/index.html) as a
jdbc appender for logging into database. For a requirement, I had to change
the datatype of a column (which stores the message string to be logged) from
varchar2(4000) to CLOB. But as soon I do this, the logging in database stops
and the stack trace got is :

log4j:ERROR JDBCAppender::flush_buffer(), :
java.sql.SQLException: Internal Error: Unable to construct a Datum from the
specified input
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:210)
    at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:829)
    at oracle.sql.SQLUtil.makeDatum(SQLUtil.java:645)
    at oracle.sql.SQLUtil.makeOracleDatum(SQLUtil.java:946)
    at
oracle.jdbc.driver.UpdatableResultSet.updateObject(UpdatableResultSet.java:1568)
    at
oracle.jdbc.driver.OracleResultSet.updateObject(OracleResultSet.java:2787)
    at org.apache.log4j.jdbcplus.JDBCLogger.append(JDBCLogger.java:742)
    at
org.apache.log4j.jdbcplus.JDBCAppender.flush_buffer(JDBCAppender.java:887)
    at org.apache.log4j.jdbcplus.JDBCAppender.append(JDBCAppender.java:867)
    at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:230)
    at
org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:65)
    at org.apache.log4j.Category.callAppenders(Category.java:203)
    at org.apache.log4j.Category.forcedLog(Category.java:388)
    at org.apache.log4j.Category.log(Category.java:853)
    at edu.unc.its.util.UNCLogger.prepareAndLogMessage(UNCLogger.java:445)
    at edu.unc.its.util.UNCLoggerClient.main(UNCLoggerClient.java:23)
log4j:ERROR JDBCAppender::flush_buffer(), :
java.sql.SQLException: Internal Error: Unable to construct a Datum from the
specified input
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:210)
    at oracle.jdbc.dbaccess.DBError.check_error(DBError.java:829)
    at oracle.sql.SQLUtil.makeDatum(SQLUtil.java:645)
    at oracle.sql.SQLUtil.makeOracleDatum(SQLUtil.java:946)
    at
oracle.jdbc.driver.UpdatableResultSet.updateObject(UpdatableResultSet.java:1568)
    at
oracle.jdbc.driver.OracleResultSet.updateObject(OracleResultSet.java:2787)
    at org.apache.log4j.jdbcplus.JDBCLogger.append(JDBCLogger.java:742)
    at
org.apache.log4j.jdbcplus.JDBCAppender.flush_buffer(JDBCAppender.java:887)
    at org.apache.log4j.jdbcplus.JDBCAppender.append(JDBCAppender.java:867)
    at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:230)
    at
org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:65)
    at org.apache.log4j.Category.callAppenders(Category.java:203)
    at org.apache.log4j.Category.forcedLog(Category.java:388)
    at org.apache.log4j.Category.log(Category.java:853)
    at edu.unc.its.util.UNCLogger.prepareAndLogMessage(UNCLogger.java:445)
    at edu.unc.its.util.UNCLoggerClient.main(UNCLoggerClient.java:23)
14:39:08,463 FATAL UNC:? - [Message logged at =2008-08-07 10:30:00][Process
Id =P1][Process Name =Process1][Transaction Id =T1][Source =Source1][Target
=Target1][Service Invoked =LOGGING][Instance Id =I1][Message Id =M1] FATAL -
This is the error message.


It will be great if any suggestions can be provided to implement CLOB with
JDBCPlus appender.

Regards,
Vaibhav
</description>
    <dc:creator>Vaibhav Kumar</dc:creator>
    <dc:date>2008-09-04T09:56:58</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.jakarta.log4j.user/17332">
    <title>network logging performance</title>
    <link>http://comments.gmane.org/gmane.comp.jakarta.log4j.user/17332</link>
    <description>If anyone out there is using "Logging over the network" of any form  
(socket, JMS, Multicast, syslog appenders etc), this topic is for you.  
I'm wondering whether people could comment on their experience setting  
up high performance logging of application data over the network.  The  
cost of shipping an event over the wire compared with writing it to a  
local file is obviously higher, and so one can notice user-visible  
impact if the logging volume is high when using network-based logging  
(unless one wraps it in AsyncAppenders).

Just curious to hear peoples experiences, strategies, and thoughts.   
Perhaps people can relate to the flow rate they've manage to achieve  
under different configurations.

The driver to my question is that for my Apache Lab project (Pinpoint)  
I'm building a central logging repository server to allow data mining  
of the generated logging events.  In a high performance site one can  
have many logging events shipped from multiple threads in, say, a web- 
app, being shipped serially over the wire, so slowing down the logging  
can slow down the response time.

cheers,

Paul Smith
</description>
    <dc:creator>Paul Smith</dc:creator>
    <dc:date>2008-09-04T01:31:23</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.jakarta.log4j.user/17319">
    <title>New Appender: PatternFileAppender</title>
    <link>http://comments.gmane.org/gmane.comp.jakarta.log4j.user/17319</link>
    <description>Hello --

I'm not sure if this is the correct way to do this, but my colleague and
I have developed a new appender called a PatternFileAppender.  I did not
see anything else like this in the log4j distribution, but it helped us
solve our particular problem, and I think it's a good general purpose
appender.  If someone knows of another appender like this, I would love
to hear about it.

I went to make an official patch for log4j 1.2, but I found that the
code needed to be compatible with 1.2 source compatibility level.  Since
the code uses generics in it's use of the LinkedHashMap data structure,
it needs 1.5 or later to compile correctly.

Anyway, I've attached the file, if there is an "official" way to do
this, please point me in the right direction.

Here is the high-level details of the appender:

* Can process a filename as a pattern, with all substitutions available.
  (e.g., MDC, date, variable, level, class, ...)

* Interesting use cases we are using it for:
    - Separate log file per "thread" using MDC (note that "thread" could
      be any separation desired, log level, date, time, etc).

* Keeps a cache of the latest 20 open file streams, so as not to
  overload the OS/filesytem/etc

* Adds performance penalty in that each log message will generate an
  extra pattern lookup.  Note that this already happens for the message
  itself, so this does not seem like a huge impact.


Let me know any feedback...  Thanks!

</description>
    <dc:creator>David Britton</dc:creator>
    <dc:date>2008-09-02T20:38:26</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.jakarta.log4j.user/17317">
    <title>DEBUG messages appearing on console?</title>
    <link>http://comments.gmane.org/gmane.comp.jakarta.log4j.user/17317</link>
    <description>
I'm trying to configure log4j so that DEBUG messages or lower priority only
appear in a log file and not the console, and anything above DEBUG appears on
the console.  This is what my log4j.properties file looks like right now,
however the DEBUG messages are still appearing on the console.  I'm using log4j
along with Commons Logging API if that makes any difference.

# Set the root logger to the INFO level and CA to be it's appender
log4j.rootLogger=WARN, CA
log4j.appender.CA=org.apache.log4j.ConsoleAppender
log4j.appender.CA.layout=org.apache.log4j.PatternLayout
log4j.appender.CA.layout.ConversionPattern=%-5p %d{yyyy-MM-dd HH:mm:ss} [%t]
%c%n\t{%m}%n%n

# LinkHarvester
log4j.logger.com.dsn.loadlink=DEBUG, harvester
log4j.appender.harvester=org.apache.log4j.RollingFileAppender
log4j.appender.harvester.File=C:/log4j/logs/LinkHarvester.log
log4j.appender.harvester.MaxFileSize=100KB
log4j.appender.harvester.MaxBackupIndex=1
log4j.appender.harvester.layout=org.apache.log4j.PatternLayout
log4j.appender.harvester.layout.ConversionPattern=%-5p %d{yyyy-MM-dd HH:mm:ss}
[%t] %c%n\t{%m}%n%n
(Embedded image moved to file: pic18467.jpg)
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe&lt; at &gt;logging.apache.org
For additional commands, e-mail: log4j-user-help&lt; at &gt;logging.apache.org</description>
    <dc:creator>Patrick.Grimard&lt; at &gt;xtl.com</dc:creator>
    <dc:date>2008-09-02T19:00:22</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.jakarta.log4j.user/17308">
    <title>single line to diffrent log file</title>
    <link>http://comments.gmane.org/gmane.comp.jakarta.log4j.user/17308</link>
    <description>

can any one healp me
 to log single line to a diffrent log file and all other logs of the same
class to the other log file

thanks in advace
</description>
    <dc:creator>praveen#123</dc:creator>
    <dc:date>2008-08-30T17:21:51</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.jakarta.log4j.user/17306">
    <title>HOw to replace the system.out.println</title>
    <link>http://comments.gmane.org/gmane.comp.jakarta.log4j.user/17306</link>
    <description>
Dear all

           I want to use the logging system in my Project which consist of
many modules developing by the 

much developers. Here I need to replace system.out.println statements and i
want put loggers.

Is there any way to configuring one property file to replace the statements.

Many thanks in advance
Rajesh
</description>
    <dc:creator>MY POI</dc:creator>
    <dc:date>2008-08-30T11:44:57</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.jakarta.log4j.user/17302">
    <title>log4j.configuration system property not taken into account?</title>
    <link>http://comments.gmane.org/gmane.comp.jakarta.log4j.user/17302</link>
    <description>
Hello, 

On http://logging.apache.org/log4j/1.2/manual.html I read that the location
of the log4j configuration file can be specified by setting the 
log4j.configuration system property in advance with the path to that file. 

However, when I start my small test application with the following VM
arguments (in eclipse), it seems not to read the log4j file. 
-Dlog4j.configuration=C:\eclipse\workspace\Log4j128Tester\conf\log4j.xml
I have thus everything configured in a log4j.xml file.

My log4j.xml file contains the following:

&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!DOCTYPE log4j:configuration SYSTEM "log4j.dtd" &gt;
&lt;log4j:configuration&gt;
&lt;appender name="file" class="org.apache.log4j.RollingFileAppender"&gt;
     
     
     
     &lt;!----&gt;
     &lt;layout class="org.apache.log4j.PatternLayout"&gt;
           
     &lt;/layout&gt;
&lt;/appender&gt;

&lt;logger name="Testappender" additivity="false"&gt;
  &lt;level value="debug" /&gt;
  &lt;appender-ref ref="file" /&gt;
&lt;/logger&gt;

&lt;/log4j:configuration&gt;

my code is the following:
package src;

import org.apache.log4j.*;

public class MainClass {

public static void main(String[] args) {

//System.out.println(System.getProperty("log4j.configuration"));

Logger lg = Logger.getLogger("Testappender");

System.out.println("start");

lg.debug("test log");
lg.info("test info");
lg.fatal("test fatal");
lg.warn("test warn");

System.out.println("end");

}

}

Am I missing something or am i doing something wrong?
Because I always receive the following error: 
log4j:WARN No appenders could be found for logger (Testappender).
log4j:WARN Please initialize the log4j system properly.

Of course, when I put the folder of the log4j.xml in the classpath, it
works. 
But this is not what we want. 
We want to make it work with the log4j.configuration system property. 

Any suggestions?
</description>
    <dc:creator>Gvd</dc:creator>
    <dc:date>2008-08-29T12:34:31</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.jakarta.log4j.user/17291">
    <title>CompositeRollingAppender compile problem</title>
    <link>http://comments.gmane.org/gmane.comp.jakarta.log4j.user/17291</link>
    <description>I downloaded the latest jar (apache-log4j-1.2.15.zip) and added the
CompositeRollingAppender.java to the
\apache-log4j-1.2.15\src\main\java\org\apache\log4j directory and ran
ant.  
 
I got:   (see below)  why is CompositeRollingAppender invoking a
FileAppender setFile method with the wrong signature? thanks...
 

D:\applications\apache-log4j-1.2.15&gt;ant jar
Buildfile: build.xml
 
init:
 
build.core:
    [javac] Compiling 1 source file to
D:\applications\apache-log4j-1.2.15\dist\classes
    [javac]
D:\applications\apache-log4j-1.2.15\src\main\java\org\apache\log4j\Compo
siteRollingAppender.java:3
71: cannot find symbol
    [javac] symbol  : method setFile(java.lang.String,boolean)
    [javac] location: class org.apache.log4j.FileAppender
    [javac]             super.setFile(fileName, append);
    [javac]                  ^
    [javac] 1 error
 
BUILD FAILED
D:\applications\apache-log4j-1.2.15\build.xml:250: Compile failed; see
the compiler error output for details.
 
Total time: 1 second
D:\applications\apache-log4j-1.2.15&gt;
 

Douglas Kent 
EDS - Enterprise Integration Services
&lt;http://www.consultingservices.us.eds.com/nlapps/docs/default.asp?fid=41
7&gt;  
A4S-A21 
13600 EDS Drive 
Herndon, VA 20171 
  
Phone: (703) 742-2644 




 
</description>
    <dc:creator>Kent, Doug</dc:creator>
    <dc:date>2008-08-26T13:32:57</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.jakarta.log4j.user/17288">
    <title>JMS Appender Issue - log4j</title>
    <link>http://comments.gmane.org/gmane.comp.jakarta.log4j.user/17288</link>
    <description>
Hi All
I am trying to use JMS Appender of log4j in my application using
log4j.properties file - but its not running.
I am using the jboss-4.2.2.GA Server. The error I am getting is as follows:

log4j:WARN No appenders could be found for
logger(org.jboss.mq.referenceable.SpyConnectionFactoryObjectFactory).
log4j:WARN Please initialize the log4j system properly.

The code does not run ahead of this warning and it stucks there.

I searched a lot but am not able to find the solution.
The log4j.properties file configuration which I am using is as follows:

log4j.rootLogger=DEBUG, jmsapp
log4j.appender.jmsapp=org.apache.log4j.net.JMSAppender
log4j.appender.jmsapp.InitialContextFactoryName=org.jnp.interfaces.NamingContextFactory
log4j.appender.jmsapp.ProviderURL=jnp://localhost:1099
log4j.appender.jmsapp.TopicBindingName=topic/testTopic
log4j.appender.jmsapp.TopicConnectionFactoryBindingName=ConnectionFactory

If someone knows about the problem - please let me know. Any help is a
welcome.

Thanks
Neha
</description>
    <dc:creator>NehaG</dc:creator>
    <dc:date>2008-08-26T05:05:45</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.jakarta.log4j.user/17287">
    <title>which config file</title>
    <link>http://comments.gmane.org/gmane.comp.jakarta.log4j.user/17287</link>
    <description>All,

how can I programmatically determine the URL to the xml file that my
app has configured itself based on? What I am trying to do is to get
the URL, load it into a DOMConfigurator so I can determine the
specifics of an appender.

Is there a better way?

Thanks
Reza
</description>
    <dc:creator>Reza Razavipour</dc:creator>
    <dc:date>2008-08-26T00:58:18</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.jakarta.log4j.user/17286">
    <title>How to get values from log4j.xml file</title>
    <link>http://comments.gmane.org/gmane.comp.jakarta.log4j.user/17286</link>
    <description>All,

I have a log4j.xml file for my application. I have something like the
following in the file:
&lt;appender name="SERVER_LOG"
class="org.jboss.logging.appender.DailyRollingFileAppender"&gt;
&lt;errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/&gt;
&lt;param name="File" value="${jboss.server.home.dir}/log/server.log"/&gt;
        ....

       /appender&gt;

How can I programmatically get the properties for SERVER_LOG appender?

Thanks in advance.
Reza
</description>
    <dc:creator>Reza Razavipour</dc:creator>
    <dc:date>2008-08-26T00:30:29</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.jakarta.log4j.user/17283">
    <title>James Matz is out of the office.</title>
    <link>http://comments.gmane.org/gmane.comp.jakarta.log4j.user/17283</link>
    <description>
I will be out of the office starting  08/22/2008 and will not return until
08/26/2008.

I will respond to your message when I return.


-----------------------------------------
This communication may contain proprietary and/or confidential
information and is the property of The Western Union Company or its
affiliates.  If you are not the intended recipient, you are hereby
notified that any use of the information contained in or
transmitted with the communication or dissemination, distribution,
or copying of this communication is strictly prohibited.  If you
have received this communication in error, please notify the
Western Union sender immediately by replying to this message and
delete it from your computer.  
</description>
    <dc:creator>James.Matz&lt; at &gt;WesternUnion.com</dc:creator>
    <dc:date>2008-08-23T02:39:19</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.jakarta.log4j.user/17279">
    <title>each thread needs a log4j file</title>
    <link>http://comments.gmane.org/gmane.comp.jakarta.log4j.user/17279</link>
    <description>All,

I have a thread pool and a set of managed objects. I need to have one
log4j file for each of the managed objects. I need to do this
dynamically since the number of managed objects will vary during the
life of the application.

Any thoughts on this?

Thanks
Reza
</description>
    <dc:creator>Reza Razavipour</dc:creator>
    <dc:date>2008-08-22T13:39:55</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.jakarta.log4j.user/17277">
    <title>Multiple Appenders additivity</title>
    <link>http://comments.gmane.org/gmane.comp.jakarta.log4j.user/17277</link>
    <description>When i was trying to log on console with additivity, i realise log4j dont care if parent categories have appropriate level to log the event.
is this a design choice and are there any other way to prevent the appenders from logging smaller level of logging events.

Best of i can do is changing the source-code of log4j


Scenerio 
I want to write all aplication logs to a file and
I want to write only error logs to console 
and I dont want repeated log statements like "consolelogger.error("error 1"); filelogger.error("error 1")"
    
--- my log4j configutration ---
log4j.rootLogger=ERROR,consol

log4j.logger.consol            =ERROR,consol
log4j.appender.consol       =org.apache.log4j.ConsoleAppender
log4j.additivity.consol        =true
...

log4j.logger.Application        =DEBUG,Application
log4j.appender.Application    =org.apache.log4j.DailyRollingFileAppender
log4j.additivity.Application     =true
...

--- Code
logger.info("log 1 - LEVEL_INFO")
logger.error("log 2 - LEVEL_ERROR")
...

while i have expecting , with the code above,

log file would contains "log 1" and "log 2"
console would contains only "log 2 "

instead i have got the console and log file contains both "log 1" and "log 2 " info

then i check the source code  and i found the problem on callAppenders() method 
and change the beheavior of the method.

</description>
    <dc:creator>Omer Dogan</dc:creator>
    <dc:date>2008-08-22T07:18:09</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.jakarta.log4j.user/17269">
    <title>missing debug statements when i changed to RollingFileAppender</title>
    <link>http://comments.gmane.org/gmane.comp.jakarta.log4j.user/17269</link>
    <description>
here is my log4j.xml -

&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;!DOCTYPE log4j:configuration SYSTEM
"log4j.dtd" &gt;
&lt;log4j:configuration&gt;

&lt;appender name="stdout123" class="org.apache.log4j.ConsoleAppender"&gt;
&lt;layout class="org.apache.log4j.PatternLayout"&gt;

&lt;/layout&gt;
&lt;/appender&gt;

&lt;appender name="file123"
class="org.apache.log4j.RollingFileAppender"&gt;




&lt;layout class="org.apache.log4j.PatternLayout"&gt;

&lt;/layout&gt;
&lt;/appender&gt;
 
&lt;category name="SalesReportsAppLog"&gt;
  &lt;priority value="debug" /&gt;
    &lt;appender-ref ref="file123" /&gt;
&lt;/category&gt;

&lt;/log4j:configuration&gt;

========
code is -

System.out.println("sree1");
org.apache.log4j.Logger log =
org.apache.log4j.Logger.getLogger("SalesReportsAppLog");
log.info("sree123--info");
log.debug("sree123--debug1");
log.info("isdebug--" + log.isDebugEnabled());
log.debug("sree123--debug2");
log.trace("sree123--trace");
System.out.println("sree2");

=======

using ConsoleAppender

sree1
13:00:14,323  INFO SalesReportsAppLog:69 - sree123--info
13:00:14,323 DEBUG SalesReportsAppLog:70 - sree123--debug1
13:00:14,354  INFO SalesReportsAppLog:71 - isdebug--true
13:00:14,354 DEBUG SalesReportsAppLog:72 - sree123--debug2
sree2

using RollingFileAppender

13:01:18,892  INFO SalesReportsAppLog:69 - sree123--info
13:01:18,892  INFO SalesReportsAppLog:71 - isdebug--true

I'm expecting those missng log stmts in the file appender too. Does anyone
know why it's not printing those 2 lines when I changed to
RollingFileAppender?

These missing in RollingFileAppender -

13:00:14,323 DEBUG SalesReportsAppLog:70 - sree123--debug1
13:00:14,354 DEBUG SalesReportsAppLog:72 - sree123--debug2

Thanks for your help.
</description>
    <dc:creator>YesKay</dc:creator>
    <dc:date>2008-08-20T18:07:30</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.jakarta.log4j.user/17267">
    <title>log settings an administrator's job?</title>
    <link>http://comments.gmane.org/gmane.comp.jakarta.log4j.user/17267</link>
    <description>Placing log4j settings in the log4j.properties (or log4j.xml) file
under WEB-INFO/classes effectively requires the developer to configure
logging - e.g. unexploded war files. Shouldn't it be the job of the
system admin who deploys the application to configure things like log
file location? Or have I missed something?

I would like to give the system admin the ability to set the location
of the log4j log file in my applications (as with access log info when
a sys admin can use org.apache.catalina.valves.AccessLogValve in
Tomcat's server.xml). The server.xml (or context.xml) seems like the
right place to set the location of the log4j log file - maybe as a
JNDI string resource.

Can anyone suggest a way of giving system administrators the means of
setting log4j configuration settings? Or, can anyone explain why this
would be a bad idea?

Thanks,

Paul.
</description>
    <dc:creator>Paul Pepper</dc:creator>
    <dc:date>2008-08-20T12:45:55</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.jakarta.log4j.user/17261">
    <title>Can custom appender override the log4j.xml configuration</title>
    <link>http://comments.gmane.org/gmane.comp.jakarta.log4j.user/17261</link>
    <description>Hi

I am writing a custom JDBC appender for log4j for my application. I want 
this custom appender NOT to be affected in any way by the loggign levels / 
appenders in the application log4j.xml file.

The custom Logger instance has only the one appender (the custom JDBC 
appender which I wrote). It has no console appender etc. But, when logging 
happens, log statements get printed on the server console and also in the 
application log files. I should mention that the application log4j.xml file 
does have the console and file appender.

I initialise the Logger instance as follows:


    Logger customLogger = Logger.getLogger("myCustomLogger");

    / / remove all appenders associated with customLogger
    customLogger.removeAllAppenders();

    // add JDBCAppenderService to customLogger
    customLogger .addAppender(new JDBCAppenderService(ds));  //ds is the 
datasource name

&lt;&lt;


Now, I use customLogger to log the information as follows:

 customLogger.info(logObject)  //logObject contains the data to be logged
&lt;&lt;



I want customLogger to remained unaffected by the settings in the log4j.xml 
file. So, if the logging level in log4j.xml is set to OFF, I still want the 
JDBC appneder to work i.e log data in the database.

Please let me know if there any way to achieve this ?? Or does the log4j.xml 
configuration overrides the settings in the class files ??

Thanks and Regards,

Aneez Backer
</description>
    <dc:creator>Aneez Backer</dc:creator>
    <dc:date>2008-08-19T04:58:22</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.jakarta.log4j.user/17258">
    <title>Using a rolling log file across multiple .ear/.war files</title>
    <link>http://comments.gmane.org/gmane.comp.jakarta.log4j.user/17258</link>
    <description>I have used log4j in the past, but I am trying to use it now for
something where I am running into problems.  Any suggestions/advice
would be appreciated.  I can't get a file logger to roll files.  When
the file reaches its preset size, it overwrites the original file
instead of rolling.

 

This situation involves a web app that includes multiple .ear files.
Each .ear file has its own log, and there is a common log file across
the web app.  I would like to create a separate log file which can be
accessed by specific pieces of each application, e.g., a special purpose
log file.  My current attempts have not been able to define a rolling
log file.  The environment is Websphere 6.0.2.x running on Windows 2003
Server.

 

My google attempts have indicated a possible problem with multiple
.ear/.war attachments to a single log file may cause problems with
rolling, but there didn't seem to be a work-around.  Having separate log
files for this specific event log across multiple .ear/.war files would
be a nightmare to debug.

 

So, how can I use a single rolling log file to function properly across
multiple .ear/.war components in a single web app?

 

Thanks,


Brent Friedman

 

</description>
    <dc:creator>Friedman, Brent</dc:creator>
    <dc:date>2008-08-18T14:06:43</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.jakarta.log4j.user/17256">
    <title>Thread org.apache.log4j.xml.XMLWatchdog</title>
    <link>http://comments.gmane.org/gmane.comp.jakarta.log4j.user/17256</link>
    <description>Hi folks,

When I use the profiling tool off the Netbeans 6.1 IDE, I see lots of Threads that got the name "org.apache.log4j.xml.XMLWatchdog". Unfortunately I didn't find much documentation about that, that's why I'm posting here.

My problem is that there's lot's of threads (about 5 per instance of B) with this name when I profile code that looks like the code below. Why is that? Does log4j really need them? The profiler says they are waiting all the time. 

Regards,
Martin

java-code:

class A{
DOMConfigurator.configure("log4j_config.xml");
Logger loggerA = Logger.getLogger("loggerA");
B b1 = new B();
B b2 = new B();
B b3 = new B();

}

class B{
Logger loggerB = Logger.getLogger("loggerB");
}

log4j_config.xml:
&lt;?xml version="1.0" encoding="UTF-8" ?&gt;
&lt;!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"&gt;

&lt;log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/"&gt;
      
  &lt;appender name="drfa" class="org.apache.log4j.RollingFileAppender"&gt;
    &lt;param name="File" value="C:\\Root.log"/&gt;
    &lt;param name="Append" value="true"/&gt;
&lt;param name="MaxFileSize" value="100KB"&gt;&lt;/param&gt;
&lt;param name="MaxBackupIndex" value="5"&gt;&lt;/param&gt;
    &lt;layout class="org.apache.log4j.PatternLayout"&gt;
      &lt;param name="ConversionPattern" value="%d{dd/MMM/yyyy HH:mm:ss,SSSS} [%t] - %p - %m%n"/&gt;
    &lt;/layout&gt;
  &lt;/appender&gt;
  
  &lt;appender name="rfa_a" class="org.apache.log4j.RollingFileAppender"&gt;
    &lt;param name="File" value="C:\\A.log"/&gt;
    &lt;param name="Append" value="true"/&gt;
&lt;param name="MaxFileSize" value="200KB"&gt;&lt;/param&gt;
&lt;param name="MaxBackupIndex" value="10"&gt;&lt;/param&gt;
    &lt;layout class="org.apache.log4j.PatternLayout"&gt;
      &lt;param name="ConversionPattern" value="%d{dd/MMM/yyyy HH:mm:ss,SSSS} [%t] - %p - %m%n"/&gt;
    &lt;/layout&gt;
  &lt;/appender&gt;
  
   &lt;appender name="rfa_b" class="org.apache.log4j.RollingFileAppender"&gt;
    &lt;param name="File" value="C:\\B.log"/&gt;
    &lt;param name="Append" value="true"/&gt;
&lt;param name="MaxFileSize" value="200KB"&gt;&lt;/param&gt;
&lt;param name="MaxBackupIndex" value="10"&gt;&lt;/param&gt;
    &lt;layout class="org.apache.log4j.PatternLayout"&gt;
      &lt;param name="ConversionPattern" value="%d{dd/MMM/yyyy HH:mm:ss,SSSS} [%t] - %p - %m%n"/&gt;
    &lt;/layout&gt;
  &lt;/appender&gt;
     
  
  &lt;logger name="loggerA" additivity="false"&gt;
&lt;level value ="all" /&gt;
    &lt;appender-ref ref="rfa_a"/&gt;
  &lt;/logger&gt;
  
  &lt;logger name="loggerB" additivity="false"&gt;
&lt;level value ="all" /&gt;
    &lt;appender-ref ref="rfa_b"/&gt;
  &lt;/logger&gt;
  
  &lt;root&gt;
    &lt;priority value ="info"/&gt;
    &lt;appender-ref ref="drfa"/&gt;
  &lt;/root&gt;

&lt;/log4j:configuration&gt;
</description>
    <dc:creator>Martin Kalany</dc:creator>
    <dc:date>2008-08-18T11:35:56</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.jakarta.log4j.user/17254">
    <title>James Matz is out of the office.</title>
    <link>http://comments.gmane.org/gmane.comp.jakarta.log4j.user/17254</link>
    <description>
I will be out of the office starting  08/15/2008 and will not return until
08/18/2008.

I will respond to your message when I return.


-----------------------------------------
This communication may contain proprietary and/or confidential
information and is the property of The Western Union Company or its
affiliates.  If you are not the intended recipient, you are hereby
notified that any use of the information contained in or
transmitted with the communication or dissemination, distribution,
or copying of this communication is strictly prohibited.  If you
have received this communication in error, please notify the
Western Union sender immediately by replying to this message and
delete it from your computer.  
</description>
    <dc:creator>James.Matz&lt; at &gt;WesternUnion.com</dc:creator>
    <dc:date>2008-08-15T22:01:21</dc:date>
  </item>
  <textinput about="http://search.gmane.org/?group=$group=gmane.comp.jakarta.log4j.user">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.jakarta.log4j.user</link>
  </textinput>
</rdf:RDF>
