|
UC Berkeley Group for User Interface Research Updated November 17, 2000 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.berkeley.guir.lib.debugging.LogFile
A file for logging messages.
Error messages should contain:
This software is distributed under the Berkeley Software License.
Revisions: - GUIRLib-v1.0-1.0.0, Jul 09 1997, JH Created class - GUIRLib-v1.2-1.0.0, Jun 22 2000, JH Touched for GUIRLib release - GUIRLib-v1.3-1.0.0, Aug 11 2000, JH Touched for GUIRLib release - GUIRLib-v1.4-1.0.0, Aug 31 2000, JH Touched for GUIRLib release
Field Summary | |
static String |
DEFAULT_LOGFILE
Name of the logfile if no logfile name is specified |
Constructor Summary | |
LogFile()
Default constructor: picks default date. |
|
LogFile(PrintWriter printWriter)
Convenience constructor knows about dates. |
|
LogFile(PrintWriter printWriter,
DateFormat dFormatDate,
DateFormat dFormatTime)
Constructor. |
|
LogFile(String strLogFileName)
Convenience constructor: picks a default date format. |
Method Summary | |
void |
close()
Close the log file. |
void |
finalize()
|
String |
getSeverityLevel(int iSeverity)
Given a severity level, translate it into a String. |
void |
logMessage(int iSeverity,
String strMessage)
Record the specified message to the log. |
void |
logMessage(String strMessage)
Record the specified message with the specified severity level to the log. |
static void |
main(String[] argv)
|
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String DEFAULT_LOGFILE
Constructor Detail |
public LogFile() throws IOException
IOException
- if there is a problem writing to the file.public LogFile(String strLogFileName) throws IOException
strLogFileName
- is the filename of the log file.IOException
- if there is a problem writing to the file.public LogFile(PrintWriter printWriter) throws IOException
printWriter
- is the output stream: perhaps
new PrintWriter( System.out );IOException
- if there is a problem writing to the file.public LogFile(PrintWriter printWriter, DateFormat dFormatDate, DateFormat dFormatTime) throws IOException
printWriter
- is the PrintWriter that points to the log file.dFormatDate
- is the date format to be usedIOException
- if there is a problem writing to the file.Method Detail |
public void finalize()
finalize
in class Object
public String getSeverityLevel(int iSeverity)
iSeverity
- is the severity level.public void close()
public void logMessage(int iSeverity, String strMessage)
strMessage
- is the message to log.public void logMessage(String strMessage)
iSeverity
- is the severity level of the message.strMessage
- is the message to log.public static void main(String[] argv)
|
Copyright Information | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |