Package org.apache.logging.log4j.message
Class ThreadDumpMessage
java.lang.Object
org.apache.logging.log4j.message.ThreadDumpMessage
- All Implemented Interfaces:
Serializable
,Message
,StringBuilderFormattable
@AsynchronouslyFormattable
public class ThreadDumpMessage
extends Object
implements Message, StringBuilderFormattable
Captures information about all running Threads.
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
Factory to create Thread information. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Writes a text representation of this object into the specifiedStringBuilder
, ideally without allocating temporary objects.Returns the title.Returns the ThreadDump in printable format.Object[]
Returns an array with a single element, a Map containing the ThreadInformation as the key.Always returns null.toString()
protected Object
Creates a ThreadDumpMessageProxy that can be serialized.
-
Constructor Details
-
ThreadDumpMessage
Generate a ThreadDumpMessage with a title.- Parameters:
title
- The title.
-
-
Method Details
-
toString
-
getFormattedMessage
Returns the ThreadDump in printable format.- Specified by:
getFormattedMessage
in interfaceMessage
- Returns:
- the ThreadDump suitable for logging.
-
formatTo
Description copied from interface:StringBuilderFormattable
Writes a text representation of this object into the specifiedStringBuilder
, ideally without allocating temporary objects.- Specified by:
formatTo
in interfaceStringBuilderFormattable
- Parameters:
sb
- the StringBuilder to write into
-
getFormat
Returns the title. -
getParameters
Returns an array with a single element, a Map containing the ThreadInformation as the key. and the StackTraceElement array as the value;- Specified by:
getParameters
in interfaceMessage
- Returns:
- the "parameters" to this Message.
-
writeReplace
Creates a ThreadDumpMessageProxy that can be serialized.- Returns:
- a ThreadDumpMessageProxy.
-
getThrowable
Always returns null.- Specified by:
getThrowable
in interfaceMessage
- Returns:
- null
-