Bug 41156

Summary: Give log4j threads reasonable names
Product: Log4j - Now in Jira Reporter: Ulrich Voigt <ulrich.voigt>
Component: OtherAssignee: log4j-dev <log4j-dev>
Status: RESOLVED FIXED    
Severity: enhancement CC: aditsu
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: Other   
OS: other   

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