Bug 41156 - Give log4j threads reasonable names
Give log4j threads reasonable names
Status: RESOLVED FIXED
Product: Log4j
Classification: Unclassified
Component: Other
unspecified
Other other
: P3 enhancement
: ---
Assigned To: log4j-dev
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2006-12-12 01:29 UTC by Ulrich Voigt
Modified: 2008-03-13 19:04 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ulrich Voigt 2006-12-12 01:29:52 UTC
Up to now log4j threads are named by java with the unmeaningful names
'Thread-x'. Give all log4j threads reasonable names so they can be recognized
quickly. 
E.g. this is useful for inspecting running programs with JMX.
Comment 1 aditsu 2007-12-05 02:16:24 UTC
I vote for this too. For example the PropertyWatchdog thread shows up as
"Thread-5". This should be trivial to fix - just add something like
setName("log4j-PropertyWatchdog") in the constructor.
Comment 2 Paul Smith 2008-03-13 19:04:43 UTC
As of revision 636954, several Threads created by log4j are given a naming convention based on the creating object.

The following classes were modified:

org/apache/log4j/AsyncAppender.java
org/apache/log4j/helpers/FileWatchdog.java
org/apache/log4j/net/SimpleSocketServer.java
org/apache/log4j/net/SocketHubAppender.java
org/apache/log4j/varia/ExternallyRolledFileAppender.java