Replacing the old DateFormat line with the following should work: log4j.appender.stdoutLog.layout.DateFormat=yyyy-MM-dd HH:mm:ss.SSS z
The TTCCLayout can accept as its DateFormat any String that the SimpleDateFormat class recognizes. See the javadoc for java.text.SimpleDateFormat for more info: http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html --Ian --- Narendra Babu Kirthi <[EMAIL PROTECTED]> wrote: > > > Hi, > I want to have TimeZone to be logged along with my log message. > Can anyone please let me know the Layout and ConversionPattern > for this. > > My log4j.properties file snippet. > ---- > log4j.appender.stdoutLog=org.apache.log4j.ConsoleAppender > log4j.appender.stdoutLog.layout=org.apache.log4j.TTCCLayout > log4j.appender.stdoutLog.layout.DateFormat=ISO8601 > log4j.appender.stdoutLog.layout.TimeZoneID=IST-8:00 > log4j.appender.stdoutLog.layout.CategoryPrefixing=false > log4j.appender.stdoutLog.layout.ThreadPrinting=false > log4j.appender.stdoutLog.layout.ContextPrinting=false > ----- > > I would like to have my log format this way > [ Wed Feb 04 13:17:41 IST 2004 ] <My message>. > > Is it possible to achieve such format using log4j. > Please let me know. > > Thanks in advance. > Narendra. > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
