[logback-dev] Small LoggingEvent suggestion

Ceki Gulcu ceki at qos.ch
Wed Mar 4 18:38:24 CET 2009


Hello Joern,

The javadocs for getId state:

public long getId()

Returns the identifier of this Thread. The thread ID is a positive long number 
generated when this thread was created. The thread ID is unique and remains 
unchanged during its lifetime. When a thread is terminated, this thread ID may 
be reused.

Thus, the id is not guaranteed to be unique either...

Joern Huxhorn wrote:
> Hi all,
> 
> I'd like to suggest to include thread id (in addition to the name) in
> LoggingEvent.
> I'd use a Long as the data type instead of long so it's possible to
> distinguish if it was initialized or not.
> 
> The name alone isn't guaranteed to be unique so the id wouldn't hurt, imho.
> 
> Joern.

-- 
Ceki Gülcü
Logback: The reliable, generic, fast and flexible logging framework for Java.
http://logback.qos.ch


More information about the logback-dev mailing list