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:[EMAIL PROTECTED]
>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: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]




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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to