> -----Original Message-----
>
> I am new to log4j and trying to put the INFO/DEBUG....messages to
> a log file. Now, when I print the same in the console, it shows
> date, time and bunch of other things (which is good), but when I
> try with teh log file, it jus shows the text message without the
> date and time. Is something wrong with
> my properties file/XML file??

Well, without seeing your properties file, I can only guess, but I suspect
that you need to add something like the following lines:

log4j.appender.FILE.layout=org.apache.log4j.PatternLayout
log4j.appender.FILE.layout.ConversionPattern=%d{MMM dd yyyy HH:mm:ss} %5p
(%C.%M:%L) - %m%n

Hope that helps.  If not, send your properties file.

-----------------------------------------------------------------
Colin MacDonald  |  Software Developer  |  Templar Corporation  |
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.377 / Virus Database: 211 - Release Date: 7/15/2002


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to