public class MorphAdornerLogger
extends java.lang.Object
implements java.io.Serializable
This class wraps a singleton instance of a
BaseLogger
for the class "edu.northwestern.at.morphadorner".
Modifier and Type | Field and Description |
---|---|
protected Logger |
logger
The wrapped logger.
|
protected MorphAdornerSettings |
morphAdornerSettings
MorphAdorner settings.
|
Constructor and Description |
---|
MorphAdornerLogger(java.lang.String configFileName,
java.lang.String logFileDirectory,
MorphAdornerSettings morphAdornerSettings)
Create a logger.
|
Modifier and Type | Method and Description |
---|---|
Logger |
createWrappedLogger(java.lang.String configFileName,
java.lang.String logFileDirectory)
Create the wrapped logger.
|
Logger |
getLogger()
Get the wrapped logger.
|
void |
logDebug(java.lang.String str)
Logs Debug message.
|
void |
logError(java.lang.String str)
Logs error message.
|
void |
logInfo(java.lang.String str)
Logs Info message.
|
void |
println(java.lang.String formatString)
Print a string to log file.
|
void |
println(java.lang.String formatString,
java.lang.Object[] objects)
Print formatted elements to log file.
|
void |
println(java.lang.String formatString,
java.lang.String value)
Print a string to log file.
|
void |
setLogger(Logger logger)
Set the wrapped logger.
|
void |
terminate()
Terminates the logger.
|
protected Logger logger
protected MorphAdornerSettings morphAdornerSettings
public MorphAdornerLogger(java.lang.String configFileName, java.lang.String logFileDirectory, MorphAdornerSettings morphAdornerSettings) throws java.io.FileNotFoundException, java.io.IOException
configFileName
- Log configuration file name.logFileDirectory
- Directory into which to write log.
Reads the log configuration file and configures the logger.
java.lang.Exception
java.io.FileNotFoundException
java.io.IOException
public void terminate()
public Logger createWrappedLogger(java.lang.String configFileName, java.lang.String logFileDirectory)
logFileDirectory
- configFileName
- If the log file directory or config file name is null, a dummy logger which generates no output is created.
public void logDebug(java.lang.String str)
str
- Log message.public void logInfo(java.lang.String str)
str
- Log message.public void logError(java.lang.String str)
str
- Log message.public Logger getLogger()
public void setLogger(Logger logger)
logger
- The logger to set.public void println(java.lang.String formatString)
formatString
- Resource string name to print.public void println(java.lang.String formatString, java.lang.String value)
formatString
- Resource string name to print.value
- String to output in format fornatStringpublic void println(java.lang.String formatString, java.lang.Object[] objects)
formatString
- Format string name.objects
- Objects to output in format fornatString