The converter uses a SimpleDateFormat which is not thread safe and so is 
synchronized. I am sure there might be minor optimizations that could be done 
to this 

What I would do is modify DatePatternConverter to 
a) use Java 8’s java.time.format.DateTimeFormatter if running on Java 8
b) use Joda Time’s DateTimeFormat if it is present.
c) create a pool of SimpleDateFormat objects and use those.

Please create a Jira issue for this.

Ralph

On Sep 3, 2014, at 3:00 PM, Mohit Anchlia <[email protected]> wrote:

> I am using log4j2 and I am seeing almost all the threads
> momentarily getting blocked on
> org.apache.loggin.log4j.core.pattern.DatePatternConverter class. Is this
> expected?


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to