aspose file tools*
The moose likes Tomcat and the fly likes Help required to log messages in tomcat : Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Help required to log messages in tomcat :"Not able to log messages to separate files"" Watch "Help required to log messages in tomcat :"Not able to log messages to separate files"" New topic
Author

Help required to log messages in tomcat :"Not able to log messages to separate files"

mic ram
Greenhorn

Joined: May 24, 2006
Posts: 14
Hi

I am not able to log the messages into separate log files in tomcat directory....

I have added following lines into server.xml of tomcat

<Context path="/kxj57" docBase="kxj57" debug="0"
reloadable="true" crossContext="false">
<Logger className="org.apache.catalina.logger.FileLogger"
prefix="localhost_kxj57." suffix=".txt"
timestamp="true"/>


I am also using log4j.properties with following lines
#
# Configures Log4j as the Tomcat system logger
#
#
# Configure the logger to output info level messages into a rolling log file.
########################


#log4j.rootLogger=INFO, R

#
# To continue using the "catalina.out" file (which grows forever),
# comment out the above line and uncomment the next.
#
log4j.rootLogger=DEBUG,INFO, A1
#
# Configuration for standard output ("catalina.out").
#######################


log4j.appender.A1=org.apache.log4j.ConsoleAppender
log4j.appender.A1.layout=org.apache.log4j.PatternLayout


########################
# Print the date in ISO 8601 format
########################

log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c - %m%n

###########
log4j.appender.A1=org.apache.log4j.FileLogger
log4j.appender.A1.DatePattern='.'yyyy-MM-dd


########################
# Edit the next line to point to your logs directory.
# The last part of the name is the log file name.
#
#log4j.appender.R.File=/usr/local/tomcat/logs/tomcat.log
#######################

log4j.appender.A1.File=F:/Program Files/Apache Group/Tomcat 4.1/logs/localhost_kxj57.log
log4j.appender.A1.layout=org.apache.log4j.PatternLayout

########################
# Print the date in ISO 8601 format
########################

log4j.appender.A1.layout.ConversionPattern=%d [%t] %-5p %c - %m%n

########################
# Application logging options
#
log4j.logger.org.apache=DEBUG
log4j.logger.org.apache=INFO



Can any body help me how to log messages to separate files so that i can have back up of each and every log
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Help required to log messages in tomcat :"Not able to log messages to separate files"