public static class Debug.Log extends Object implements Serializable, RevisionHandler
Debug.SimpleLog,
Serialized Form| Constructor and Description |
|---|
Debug.Log()
default constructor, uses only stdout
|
Debug.Log(String filename)
creates a logger that logs into the specified file, if null then only
stdout is used.
|
Debug.Log(String filename,
int size,
int numFiles)
creates a logger that logs into the specified file, if null then only
stdout is used.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getFilename()
returns the filename of the log, can be null
|
int |
getNumFiles()
returns the number of files being used
|
String |
getRevision()
Returns the revision string.
|
int |
getSize()
returns the size of the files
|
void |
log(Level level,
String message)
logs the given message
|
void |
log(Level level,
String sourceclass,
String message)
prints the given message with the specified level
|
void |
log(Level level,
String sourceclass,
String sourcemethod,
String message)
prints the given message with the specified level
|
void |
logSystemInfo()
a convenience method for dumping the current system info in the
log file
|
static Level |
stringToLevel(String level)
turns the string representing a level, e.g., "FINE" or "ALL" into
the corresponding level (case-insensitive).
|
String |
toString()
returns a string representation of the logger
|
public Debug.Log()
public Debug.Log(String filename)
filename - the file to log intopublic Debug.Log(String filename, int size, int numFiles)
filename - the file to log intosize - the size of the files in bytesnumFiles - the number of files for rotatingpublic static Level stringToLevel(String level)
level - the string to return a level forpublic String getFilename()
public int getSize()
public int getNumFiles()
public void log(Level level, String message)
level - the level of severitymessage - the message to logpublic void log(Level level, String sourceclass, String message)
level - the level of loggingsourceclass - the class that logs the messagemessage - the message to printpublic void log(Level level, String sourceclass, String sourcemethod, String message)
level - the level of loggingsourceclass - the class that logs the messagesourcemethod - the method that logs the messagemessage - the message to printpublic void logSystemInfo()
SystemInfopublic String toString()
public String getRevision()
getRevision in interface RevisionHandlerCopyright © 2014 University of Waikato, Hamilton, NZ. All Rights Reserved.