I think you haven't defined the root category in your log4j.properties file. That might be causing the problem.
Adding following lines should fix the problem: log4j.rootCategory=[priority], appenderName Regards, gaurav On 1/2/06, mukesh <[EMAIL PROTECTED]> wrote: > > Hi friends, > > > > I am not able to log the information. Though file gets created > after restarting the tomcat5.5.12 but nothing is being written. > > > > **I have done application specific setting > > log4j.properties is on > > /usr/local/apache-tomcat-5.5.12/webapps/axis/WEB-INF/classes/ > > > > And log4j-1.2.8.jar , commons-logging-1.0.4.jar are on > following path > > > > /usr/local/apache-tomcat-5.5.12/webapps/axis/WEB-INF/lib/ > > > > > > Following text is from Log4j.properties > > > > //////////////////////starts > > > > # 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 > > > > # > > # Configuration for a rolling log file ("tomcat.log"). > > # > > log4j.appender.R=org.apache.log4j.DailyRollingFileAppender > > log4j.appender.R.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/apache-tomcat-5.5.12/logs/ tomcat.log > > log4j.appender.R.layout=org.apache.log4j.PatternLayout > > # > > # Print the date in ISO 8601 format > > # > > log4j.appender.R.layout.ConversionPattern=%d [%t] %-5p %c - %m%n > > > > # > > # Application logging options > > # > > #log4j.logger.org.apache=DEBUG > > log4j.logger.org.apache=INFO > > #log4j.logger.org.apache.struts=DEBUG > > #log4j.logger.org.apache.struts=INFO > > > > ////////////////////////////////////////////ENDS > > > > > > And following is the code I am using to write the log in to the file > > import org.apache.commons.logging.Log; > > import org.apache.commons.logging.LogFactory; > > /** > > * > > * @author mukesh > > */ > > public class HungamamwsImpl > > { > > > > private Log myLog; > > > > /** Creates a new instance of HungamamwsImpl */ > > public HungamamwsImpl() > > { > > myLog = LogFactory.getLog(HungamamwsImpl.class); > > myLog.info("Logging started in Hungama Web Service"); > > > myLog.info > ("**************************************************************") > ; > > } > > > > public String func1(String s) > > { > > return s; > > } > > > > } > > > > Above mentioned file is a webservice. > > > > > > > > Please suggest what could be the problem. > > > > Regards > > Mukesh > > > -- http://www.gauravkushwaha.com