yes sorry for that.. I have fixed all that and now I find that Im not able to insert details into the table properly.
log4j.appender.db.sql=INSERT INTO LOGTEST (Date, Logger, Priority, Message) VALUES (%d,%c,%p,%m)
But I get SQL syntax error
this is my log4.props
# This is the configuring for logging to various Appenders in the Application Server
log4j.rootCategory=INFO,stdout,R,mail,db
###Logging to console(transient logging)
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
#
Pattern to output the caller's file name and line number.
log4j.appender.stdout.layout.ConversionPattern=[@APPNAME@] %p [%t] %c{1}.%M(%L) | %m%n
### Logging to a Log file(transient logging)
log4j.appender.R=org.apache.log4j.RollingFileAppender
# You can change this to be an absolute path or even an environment variable
# If you're using an environment variable, you will have to set JAVA_OPTS
# to contain this variables - for example in the catalina.sh or catalina.bat
# file
log4j.appender.R.File=@
[email protected] log4j.appender.R.MaxFileSize=100KB
# Don't keep a backup file
log4j.appender.R.MaxBackupIndex=0
log4j.appender.R.layout=org.apache.log4j.PatternLayout
log4j.appender.R.layout.ConversionPattern=%p %t %c - %m%n
### Configuration for receiving e-mails when ERROR messages occur.
log4j.appender.mail=org.apache.log4j.net.SMTPAppender
log4j.appender.mail.To=@ERROR-MAILTO@
log4j.appender.mail.From=@ERROR-SERVER@
log4j.appender.mail.SMTPHost=@ERROR-MAILHOST@
log4j.appender.mail.Threshold=ERROR
log4j.appender.mail.BufferSize=1
log4j.appender.mail.Subject=[@ERROR-MAILHOST@] @APPNAME@ Application Error
log4j.appender.mail.layout=org.apache.log4j.PatternLayout
log4j.appender.mail.layout.ConversionPattern=%d %-5p %c %x - %m%n
### Configuration for logging ERROR messages to the database occur.
log4j.appender.db=org.apache.log4j.jdbc.JDBCAppender
log4j.appender.db.Driver=net.sourceforge.jtds.jdbc.Driver
log4j.appender.db.URL=url
log4j.appender.db.user=id
log4j.appender.db.password=password
log4j.appender.db.Threshold=DEBUG
log4j.appender.db.sql=INSERT INTO LOGTEST (Date) VALUES (%d)
log4j.appender.db.layout=org.apache.log4j.PatternLayout
# If programmed properly the most messages would be at DEBUG
# and the least at FATAL.
log4j.logger.com.cpt.lis=DEBUG
log4j.logger.com.cpt.lis.webapp.filter=ERROR
log4j.logger.com.cpt.lis.webapp.listener.UserCounterListener=WARN
log4j.logger.com.cpt.lis.util=WARN
log4j.logger.com.cpt.lisclinicallab=DEBUG
log4j.logger.com.cpt.lisclinicallab.webapp.action=DEBUG
log4j.logger.com.cpt.lisclinicallab.webapp.filter=ERROR
log4j.logger.com.cpt.lisclinicallab.webapp.listener.UserCounterListener=WARN
log4j.logger.com.cpt.lisclinicallab.util=WARN
log4j.logger.com.cpt.liscommon=DEBUG
log4j.logger.com.cpt.liscommon.webapp.filter=ERROR
log4j.logger.com.cpt.liscommon.webapp.listener.UserCounterListener=WARN
log4j.logger.com.cpt.liscommon.util=WARN
log4j.logger.com.cpt.lisbloodbank=DEBUG
# Control logging for other open source packages
log4j.logger.com.opensymphony.oscache=ERROR
log4j.logger.net.sf.navigator=ERROR
log4j.logger.net.sf.acegisecurity=WARN
log4j.logger.net.sf.acegisecurity.intercept.event.LoggerListener=WARN
log4j.logger.org.apache.commons=ERROR
log4j.logger.org.apache.struts=WARN
log4j.logger.org.displaytag=ERROR
log4j.logger.org.springframework=WARN
log4j.logger.com.ibatis.db=WARN
log4j.logger.org.apache.velocity=WARN
# Don't show debug logs for WebTest
log4j.logger.com.canoo.webtest=WARN
# All hibernate log output of "info" level or higher goes to stdout.
# For more verbose logging, change the "info" to "debug" on the last line.
log4j.logger.org.hibernate.ps.PreparedStatementCache=WARN
log4j.logger.org.hibernate=WARN
# Changing the log level to DEBUG will result in Hibernate generated
# SQL to be logged.
log4j.logger.org.hibernate.SQL=ERROR
# Changing the log level to DEBUG will result in the PreparedStatement
# bound variable values to be logged.
log4j.logger.org.hibernate.type=ERROR