public class LogMessage
extends java.io.PrintWriter
PrintWriter
to
inherit all sort of useful print
methods and adds another
print
method to write a stack trace into the log
message.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NEW_LINE
The new line sequence.
|
Constructor and Description |
---|
LogMessage()
Creates a new empty message.
|
LogMessage(java.lang.String msg,
java.lang.Throwable t)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
print(java.lang.Throwable t)
Writes a stack trace into this log message.
|
java.lang.String |
toString()
Returns the current content of the message.
|
append, append, append, checkError, clearError, close, flush, format, format, print, print, print, print, print, print, print, print, print, printf, printf, println, println, println, println, println, println, println, println, println, println, setError, write, write, write, write, write
public static final java.lang.String NEW_LINE
public LogMessage()
public LogMessage(java.lang.String msg, java.lang.Throwable t)
msg
- The message to log.t
- The error to log.public void print(java.lang.Throwable t)
t
- The exception.public java.lang.String toString()
toString
in class java.lang.Object