Hello,

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
logged.

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

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
%m%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
WEB-INF/lib/commons-logging-1.0.2.jar
WEB-INF/lib/log4j-1.2.8.jar



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

Reply via email to