Hi,
I'm using Torque, as a stand alone, in my web-application running on tomcat.
To initialize torque at the start of my application I wrote a
ServletContextListener and basically it works out.
But when I want to have log4j do Logging for the part I wrote on my own (the
application itself), I come in trouble.
I used the same method (another ServletContextListener that is mentioned
first in web.xml) to initialize log4j as I done it with torque and the
log4j.properties looks like this:
log4j.rootLogger=DEBUG, DRFA
log4j.appender.DRFA=org.apache.log4j.DailyRollingFileAppender
log4j.appender.DRFA.File=/logs/zeiterfassung.log
log4j.appender.DRFA.DatePattern='.'yyyy-MM-dd:
log4j.appender.DRFA.layout=org.apache.log4j.PatternLayout
log4j.appender.DRFA.layout.ConversionPattern=%-5p %d{DATE} %r [%t] %c %C{2}
%M - %m%n
So I'm using log4j-1.2 at this point. (and not log4j-1.1.3 as torque)
The torque.properties looks as follows:
# -------------------------------------------------------------------
torque.applicationRoot = .
# -------------------------------------------------------------------
#
# L O G G I N G
#
# -------------------------------------------------------------------
# We use Log4J for all Torque logging and we embed the log4j
# properties within our application configuration.
# -------------------------------------------------------------------
# This first category is required and the category
# must be named 'default'. This is used for all logging
# where an explicit category is not specified.
log4j.category.org.apache.torque = DEBUG, org.apache.torque
log4j.appender.org.apache.torque = org.apache.log4j.FileAppender
log4j.appender.org.apache.torque.file =
${torque.applicationRoot}/logs/torque.log
#log4j.appender.org.apache.torque.file = c:/logging/torque.log
log4j.appender.org.apache.torque.layout = org.apache.log4j.PatternLayout
log4j.appender.org.apache.torque.layout.conversionPattern = %d [%t] %-5p
%c - %m%n
log4j.appender.org.apache.torque.append = false
# -------------------------------------------------------------------
When I start tomcat then I get always only 1 logfile which is called
zeiterfassung.log. This contains as well the logging of the torque-section
and I can't do anything about it.
Additionally it seems that I can't control the output directory because the
output is always in the same directory : "/logs" (I think that is coded in
the Torque.class) from where I started tomcat (I'm under Windows).
So, if somebody know how to manage this I'd be very glad to get this
information.
cheers, Ralf
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>