public interface LogWriter
Log4jWriter| Modifier and Type | Method and Description |
|---|---|
void |
addAppender(Object appender)
Adds the appender.
|
void |
addAppender(Object object,
Object appender)
Adds the appender.
|
Object |
getDefaultAppender(OutputStream stream)
Creates the default appender which outputs to the stream.
|
String |
log(int logType,
Object object,
String message,
Throwable throwable)
Logs a message.
|
void |
removeAppender(Object appender)
Removes the appender.
|
void |
removeAppender(Object object,
Object appender)
Removes the appender.
|
void |
setLevel(int level)
Sets the log levelt.
|
void |
setLevel(Object object,
int level)
Sets the log level for the object.
|
void addAppender(Object appender)
appender - the appendervoid addAppender(Object object,
Object appender)
object - the objectappender - the appenderObject getDefaultAppender(OutputStream stream)
stream - the streamString log(int logType,
Object object,
String message,
Throwable throwable)
logType - The type of log that is being written. Common types are
"info", "debug", "warning", "fatal", etc.object - The object that is writing the message. If the object is a
static class (such as Logger), pass the Class object instead -
e.g., "Logger.class". Null is acceptable.message - The actual message to write to the log. Null is acceptable,
but why would you?throwable - Any Throwable whose contents you want written with the log
message. The Throwable's cause is check recursively and
displays all causes in an abbreviated format.void removeAppender(Object appender)
appender - the appendervoid removeAppender(Object object,
Object appender)
object - the objectappender - the appendervoid setLevel(int level)
level - The type of log that is being written. Common types are
"info", "debug", "warning", "fatal", etc.void setLevel(Object object,
int level)
object - The object that is writing the message.level - The type of log that is being written. Common types are
"info", "debug", "warning", "fatal", etc.Copyright © 2010-2020 Toolsverse. All Rights Reserved.