public abstract class LogWriter
extends java.lang.Object
Constructor and Description |
---|
LogWriter()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
log(LogLevel level,
java.lang.String logID,
java.lang.String msg,
java.util.List<java.lang.Object> args)
Deprecated.
Generates a log message as a string and calls the write method.
|
protected java.lang.String |
prefix(LogLevel level,
java.lang.String logID)
Deprecated.
Override to change the prefix string of the log message.
|
protected java.lang.String |
suffix(LogLevel level,
java.lang.String logID)
Deprecated.
Override to change the suffix string of the log message.
|
protected abstract void |
write(LogLevel level,
java.lang.String logID,
java.lang.String msg)
Deprecated.
Implement this method to determine how the log message is written.
|
public void log(LogLevel level, java.lang.String logID, java.lang.String msg, java.util.List<java.lang.Object> args)
The default implementation generates a log message based on the prefix,
suffix, message string, and log arguments, and passes the generated log
message, level, and logId to write(org.apache.daffodil.japi.logger.LogLevel, java.lang.String, java.lang.String)
.
Can be overridden if more control is needed over the logging mechanism and/or log arguments are needed as separate entities.
level
- level of the messagelogID
- identification of class that created the log messagemsg
- printf-style format stringargs
- arguments passed to the logger, matching the format stringprotected java.lang.String prefix(LogLevel level, java.lang.String logID)
By default, the prefix is the empty string.
level
- level of the messagelogID
- identification of class that created the log messageprotected java.lang.String suffix(LogLevel level, java.lang.String logID)
By default, the suffix is the empty string.
level
- level of the messagelogID
- identification of class that created the log messageprotected abstract void write(LogLevel level, java.lang.String logID, java.lang.String msg)
level
- level of the messagelogID
- identification of class that created the log messagemsg
- log message