dcsimg
regarding Log4.xml to add timestamp in log file
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Mani_Kumar
Posted On:   Monday, August 13, 2007 11:26 AM

dear Sir, Could you guide me how to append the timestamp got appeared in log file which has been generated from Log4j.xml?? This is my Log4j.xml. <?xml version="1.0" encoding="UTF-8"?> xmlns:log4j="http://jakarta.apache.org/log4j/"> - {message}{newline} --> root - com - com.ociweb - com.ociweb.demo - com.ociweb.demo.LogJDemo --> for being used in addition to this one. --   More>>

dear Sir,

Could you guide me how to append the timestamp got appeared in log file which has been generated from Log4j.xml??

This is my Log4j.xml.


<?xml version="1.0" encoding="UTF-8"?>



xmlns:log4j="http://jakarta.apache.org/log4j/">








































It would be great, if you could give the solution for this.
There is no probs in getting timestamp from the folowing properties file
Log4j.properties:


#
# Configure the logger to output info level messages into a rolling log file.
#
log4j.rootLogger=DEBUG, R
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=c:/temp/log/${log.file}
log4j.appender.R.layout=org.apache.log4j.PatternLayout
#
# Print the date in ISO 8601 format
#
log4j.appender.R.layout.ConversionPattern=%d %-5p %c %L - %m%n


but i need it from Log4j.xml
thanks in advance
mani    <<Less
About | Sitemap | Contact