commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nikolay Georgiev" <>
Subject [Commons Logging] Tomcat - Don't write to the File
Date Thu, 13 Apr 2006 17:47:46 GMT

I've adjusted the my web application on Tomcat to use commons logging, but
somehow the size of the file in which it should write is always 0kb. Though,
the last modified time of this file is always updated, when something is

So I have a Start-up-Servlet who loads the absolute filePath into a
variable(log4jConfigFile) and then I call the

Every Class has it's own log file initialized like
private static Log log = LogFactory.getLog(myclass.class);

The Config File looks like that:
========================================= Config file
# --------------------------------------------------------------------------
# Root-Logger settings - INFO should be selected to see Importoutput
# --------------------------------------------------------------------------
log4j.rootLogger = DEBUG, default, ImportLogFile

# --------------------------------------------------------------------------
# Logging to console with Default-Logger
# --------------------------------------------------------------------------
log4j.appender.default = org.apache.log4j.ConsoleAppender
log4j.appender.default.layout = org.apache.log4j.PatternLayout
log4j.appender.default.layout.conversionPattern = %m%n

# --------------------------------------------------------------------------
# Loggin to file with ImportLogFile-Logger
# --------------------------------------------------------------------------
log4j.appender.ImportLogFile = org.apache.log4j.FileAppender
log4j.appender.ImportLogFile.file = d:/import.log
log4j.appender.ImportLogFile.append = false
log4j.appender.ImportLogFile.layout = org.apache.log4j.PatternLayout
log4j.appender.ImportLogFile.layout.conversionPattern = %d [%t] %-5p %c %n

========================================= Config file END

So it writes to the file d:/import.log, and this file is always 0kb, but by
looking at the last modified date of the file, I see that it's always
accessed when log operation is executed.

Does anyone have an idea, why nothing is written to the file?

I'm using
Tomcat 5.0

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message