Hi,
It seems like there are few trivial improvement but critical for the logger
performance.
I think it's about time to refactor the module.
e.g.:
**
*1. LogRecord (line 147-148):*
*synchronized* (LogRecord.*class*) {
sequenceNumber = globalSequenceNumber++;
*[Guy]**This is a real concurrency killer, isn't AtomicLong a much better
solution?*
*2. LogRecord (line 149-154):*
Integer id = threadIds.get(); // This is a ThreadLocal…
*if* (id == *null*) {
id = *new* Integer(nextThreadId++);
threadIds.set(id);
}
threadID = id.intValue();
*[Guy] **Isn't Thread.currentThread().getId() a better solution?*
*3. LogRecord (line 143-144):*
// Make sure level isn't null, by calling random method.
level.getClass();
*[Guy] Is it really the best way to write a fast, readable and maintainable
code???*
Guy