This content has been marked as final.
Show 3 replies
-
1. Re: JBMLoggerFormatter is synchronized
ataylor Jun 24, 2009 2:56 PM (in response to timfox)Won't that provide a horrendous contention point?
I guess that depends on how much logging is going on. The alternative is to make SimpleDateFormat and Date local to the format method and create them every time. -
2. Re: JBMLoggerFormatter is synchronized
timfox Jun 24, 2009 3:00 PM (in response to timfox)Under trace logging this would be a big problem.
(Actually the old JDK logging used to have similar issues to what you re-introduced here, but they fixed it)
It really can't be synchronized. Object creation is extremely fast these days in modern JVMs. -
3. Re: JBMLoggerFormatter is synchronized
ataylor Jun 25, 2009 3:13 AM (in response to timfox)t really can't be synchronized. Object creation is extremely fast these days in modern JVMs
Ok I have removed the synchronisation.(Actually the old JDK logging used to have similar issues to what you re-introduced here, but they fixed it)
I'm not sure they have, take a look at java.util.logging.SimpleFormatter which is the default formatter.