|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sodius.mdw.core.util.log.AbstractLogger
com.sodius.mdw.core.util.log.FileLogger
public class FileLogger
Outputs log information into a file.
Clients may instantiate or subclass this class.
| Constructor Summary | |
|---|---|
FileLogger(File file)
Constructs a logger which outputs log information into the specified file. |
|
FileLogger(File file,
boolean append)
Constructs a logger which outputs log information into the specified file. |
|
| Method Summary | |
|---|---|
protected void |
log(Level level,
Object message,
Throwable error)
Appends the specified message and error to the underlying file. |
| Methods inherited from class com.sodius.mdw.core.util.log.AbstractLogger |
|---|
createMessage, debug, debug, debug, error, error, error, getLevel, info, info, info, isLoggable, setLevel, warning, warning, warning |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FileLogger(File file)
throws FileNotFoundException
If the file exists but is a directory rather than a regular file,
does not exist but cannot be created, or cannot be opened for any other reason
then a FileNotFoundException is thrown.
file - the file where to log information.
FileNotFoundException - if the file exists but is a directory rather than a regular file,
does not exist but cannot be created, or cannot be opened for any other reason.
public FileLogger(File file,
boolean append)
throws FileNotFoundException
If the file exists but is a directory rather than a regular file,
does not exist but cannot be created, or cannot be opened for any other reason
then a FileNotFoundException is thrown.
file - the file where to log information.append - if true, then information will be written to the end of the file rather than the beginning.
FileNotFoundException - if the file exists but is a directory rather than a regular file,
does not exist but cannot be created, or cannot be opened for any other reason.| Method Detail |
|---|
protected void log(Level level,
Object message,
Throwable error)
log in class AbstractLoggerlevel - the log level (not considered by the implementation).message - the information to log (usually a String), maybe null.error - an exception to log, maybe null.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||