tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "mukesh" <muk...@hungama.com>
Subject Logging problem
Date Mon, 02 Jan 2006 12:45:23 GMT
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


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message