You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Oisin O Murchu <oi...@thegoodsoftwarecompany.com> on 2004/02/03 20:52:49 UTC

log4j Training

Hi,

I would you be grateful if you could provide a link to my company, The 
Good Software Company. We are an Ireland based software consultancy, 
training and development company, providing mentoring and training in 
areas such as Log4j, JUnit, Ant and Struts.

Regds.,

Oisín Ó Murchú
http://www.thegoodsoftwarecompany.com

The Good Software Company Ltd.
69 Seapark
Mount Prospect Avenue
Clontarf
Dublin 3
Ireland

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: TimeZone in logged message.

Posted by Narendra Babu Kirthi <nk...@cisco.com>.
Hi Ian,

    Thanks alot for the pointer you gave. It works..

Thanks & Regards
Naren

haggaic2v7-loguser@yahoo.com wrote:

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

Re: TimeZone in logged message.

Posted by ha...@yahoo.com.
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 <nk...@cisco.com> 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: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


TimeZone in logged message.

Posted by Narendra Babu Kirthi <nk...@cisco.com>.

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