You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Nithya Sivaraman <ns...@cs.indiana.edu> on 2003/10/08 07:09:06 UTC

Log not written to file


I am using OGSA-DAI application, which uses log4j. The log messages are
written to console, but not to the file as specified in the
log4j.properties file.

Contents of log4j.properties file :
log4j.debug=true
log4j.rootCategory=DEBUG, fileAppender
log4j.category.org.apache=DEBUG, fileAppender
log4j.appender.fileAppender=org.apache.log4j.RollingFileAppender
log4j.appender.fileAppender.Threshold=DEBUG
log4j.appender.fileAppender.layout=org.apache.log4j.PatternLayout
log4j.appender.fileAppender.layout.ConversionPattern=%-4r [%t] %-5p %c  %x -%m%n
log4j.appender.fileAppender.File=/u/globus/OGSA_DAI_3copy/jakarta-tomcat-4.1.27/ogsa-dai-debug.log


The client program that I run initializes by,

private static Logger mLog =
Logger.getLogger(Client.class);Logger.getRootLogger().setLevel(Level.DEBUG);
Category.getInstance("log4j.category.org.apache").setLevel(Level.DEBUG);
mLog.debug("Initializing log4j");

Contents of catalina.out:

Starting service Tomcat-Standalone
Apache Tomcat/4.1.27
log4j: Parsing for [root] with value=[DEBUG, fileAppender].
log4j: Level token is [DEBUG].
log4j: Category root set to DEBUG
log4j: Parsing appender named "fileAppender".
log4j: Parsing layout options for "fileAppender".
log4j: Setting property [conversionPattern] to [%-4r [%t] %-5p %c  %x
-%m%n].
log4j: End of parsing for "fileAppender".
log4j: Setting property [threshold] to [DEBUG].
log4j: Setting property [file] to
[/u/globus/OGSA_DAI_3copy/jakarta-tomcat-4.1.27/ogsa-dai-debug.log].
log4j: setFile called:
/u/globus/OGSA_DAI_3copy/jakarta-tomcat-4.1.27/ogsa-dai-debug.log, true
log4j: setFile ended
log4j: Parsed "fileAppender" options.
log4j: Parsing for [org.apache] with value=[DEBUG, fileAppender].
log4j: Level token is [DEBUG].
log4j: Category org.apache set to DEBUG
log4j: Parsing appender named "fileAppender".
log4j: Appender "fileAppender" was already parsed.
log4j: Handling log4j.additivity.org.apache=[null]
log4j: Finished configuring.


I have set the CATALINA_OPTS variable to
-Dlog4j.properties.file=/u/globus/OGSA_DAI_3copy/jakarta-tomcat-4.1.27/webapps/ogsa/WEB-INF/classes/log4j.properties


Please let me know why the messages are not getting logged to the file.

Thanks,
Nithya Sivaraman

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org