logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Narendra Babu Kirthi <nkir...@cisco.com>
Subject TimeZone in logged message.
Date Wed, 04 Feb 2004 15:27:19 GMT


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: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Mime
View raw message