edu.unh.sdb.datasource
Class Log
java.lang.Object
edu.unh.sdb.datasource.Log
public abstract class Log
- extends java.lang.Object
This class provides basic logging functionality for errors and
debugging. It is meant to be used statically, that is, no Log
object is ever instantiated.
Constructor Summary |
Log()
|
Method Summary |
static void |
init(java.lang.String filename,
int policy)
Initialize the log by specifying a filename (or null), and
also a logging policy. |
static void |
log(java.lang.String message)
Write a message to the log. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LogToFile
public static final int LogToFile
- See Also:
- Constant Field Values
LogToStdErr
public static final int LogToStdErr
- See Also:
- Constant Field Values
Log
public Log()
init
public static void init(java.lang.String filename,
int policy)
- Initialize the log by specifying a filename (or null), and
also a logging policy. The logging policy is formed from the
bitwise OR of one or more of the policy specifiers: LogToFile
and LogToStdErr.
The log file is actually appended to. Prior log informtation
will be preserved.
This function prints a banner to the log that contains
the current date, thereby distinguishing the log data for
different runs.
log
public static void log(java.lang.String message)
- Write a message to the log.