public abstract class Log extends Object
Manages the logging of exceptions and status information.
To select a particular implementation with which to log, set the system property
ca.on.uhn.hl7.log to the fully qualified class name of a subclass
of Log before getInstance() is first called. If this property is not set, the
default FileLog is used with the log files "hl7_exceptions_
The logs entries arising from a particular VM can be named, to distinguish them from log entries from other VMs. To do this, set the system property "ca.uhn.hl7v2.log.name" to something descriptive.
| Constructor and Description |
|---|
Log()
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
abstract String |
getDescription()
Deprecated.
Returns a description of where logged data are being stored.
|
static Log |
getInstance()
Deprecated.
Returns the singleton instance of Log.
|
abstract void |
log(Exception e,
String message)
Deprecated.
Logs an Exception.
|
abstract void |
log(String status)
Deprecated.
Logs a status message.
|
static void |
main(String[] args)
Deprecated.
|
static void |
tryToLog(Exception e,
String message)
Deprecated.
Convenience method for logging exceptions - if a LogException
is thrown while logging, the original exception is written to std out
and no exception is thrown by this method.
|
public Log()
public static Log getInstance() throws LogException
Returns the singleton instance of Log. The Log returned will be an instance of a subclass that uses a specific means of logging (e.g. logging to a particular text file or database).
LogException - there is a problem opening the Log or the subclass
specified can not be found or is not in fact a subclass of Log.public static void tryToLog(Exception e, String message)
public abstract void log(Exception e, String message) throws LogException
LogException - if there is an error writing to the log.public abstract void log(String status) throws LogException
LogException - if there is an error writing to the log.public abstract String getDescription()
Copyright © 2001-2011 University Health Network. All Rights Reserved.