I'm Working with Tomcat4.0
The log4j.properties file is in the directory WEB-INF/classes (see below). But Log4j only logs on the standard-out which seams to be the "tomcat-shell". What do I do wrong?
# log4j configuration file that outputs both to System.out
# and a file named 'log4j.txt'.
# For the general syntax of property based configuration files see the
# documenation of org.apache.log4j.PropertyConfigurator.
# WARNING: Location information can be useful but is very costly in
# terms of computation.
# The root category uses the appenders called A1 and A2.
log4j.rootCategory=DEBUG, A1, A2
# A1 is set to be ConsoleAppender sending its output to System.out
log4j.appender.A1=org.apache.log4j.ConsoleAppender
# A1 uses PatternLayout.
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
# The conversion pattern consists of date in ISO8601 format, priority,
# thread name, category name truncated to its rightmost two components
# and left justified to 17 characters, location information consisting
# of file name (padded to 13 characters) and line number, nested
# diagnostic context, the and the application supplied message
# %d = date
# %-5p = priority
# %-17c{2} categorie
# (%13F:%L) Fieldname und Linnumber
# %3x NDC (Nested diagnostic context)
# %m application supplied message
# %n new line
# %M Methodenname
log4j.appender.A1.layout.ConversionPattern=%d %-5p %-17c{2}.%M():%L %3x - %m%n
# Appender A2 writes to the file "log4j.txt".
log4j.appender.A2=org.apache.log4j.FileAppender
log4j.appender.A2.File=log4j.txt
# Truncate 'log4j.txt' if it aleady exists.
log4j.appender.A2.Append=false
# Appender A2 uses the PatternLayout.
log4j.appender.A2.layout=org.apache.log4j.PatternLayout
log4j.appender.A2.layout.ConversionPattern=%d %-5p [%t] %-17c{2}.%M():%L %3x - %m%n
Mit freundlichen Grüssen
Beat Friedli
email: <mailto:[EMAIL PROTECTED]>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]