logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <Yoav.Shap...@mpi.com>
Subject RE: [PATCH] add 'timeStampFormat' property to HTMLLayout
Date Thu, 08 Jan 2004 13:09:51 GMT

Howdy,
Or just use the log4j-safe org.apache.log4j.helpers.ISO8601DateFormat or
org.apache.log4j.helpers.DateTimeDateFormat, both of which are very
fast.

Yoav Shapira
Millennium ChemInformatics


>-----Original Message-----
>From: Paul Smith [mailto:paul.smith@lawlex.com.au]
>Sent: Wednesday, January 07, 2004 6:24 PM
>To: Log4J Developers List
>Subject: Re: [PATCH] add 'timeStampFormat' property to HTMLLayout
>
>
>> This sounds good, but SimpleDateFormat is not thread-safe.  So it
would
>> not be a good idea to share an instance without some sort of
>> synchronization.  (I'm assuming that log4j won't supply this
>> automatically.)  So it becomes a question of where do you want the
>> performance hit: garbage collection or synchronization?
>
>This is true, but a Layout instance is not shared within Log4j, and
>since an appender sync's it's own doAppend method, I believe there
would
>be enough syncronization to protect it.
>
>It might be good to have documentation that the HTMLLayout class is not
>Threadsafe if the optional dateFormat pattern is used (unless
>specifically protected by the surrounding appender).
>
>cheers,
>
>Paul Smith
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
>For additional commands, e-mail: log4j-dev-help@logging.apache.org




This e-mail, including any attachments, is a confidential business communication, and may
contain information that is confidential, proprietary and/or privileged.  This e-mail is intended
only for the individual(s) to whom it is addressed, and may not be saved, copied, printed,
disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately
delete this e-mail from your computer system and notify the sender.  Thank you.


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


Mime
View raw message