ca.uhn.hl7v2
Class Log

java.lang.Object
  extended by ca.uhn.hl7v2.Log
Direct Known Subclasses:
FileLog

Deprecated. MUST USE jakarta-commons-logging

public abstract class Log
extends java.lang.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__.log" and "hl7_status__.log" in the working directory.

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.

Author:
Bryan Tripp (bryan_tripp@sourceforge.net)

Constructor Summary
Log()
          Deprecated.  
 
Method Summary
abstract  java.lang.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(java.lang.Exception e, java.lang.String message)
          Deprecated. Logs an Exception.
abstract  void log(java.lang.String status)
          Deprecated. Logs a status message.
static void main(java.lang.String[] args)
          Deprecated.  
static void tryToLog(java.lang.Exception e, java.lang.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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Log

public Log()
Deprecated. 
Method Detail

getInstance

public static Log getInstance()
                       throws LogException
Deprecated. 

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).

Throws:
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.

tryToLog

public static void tryToLog(java.lang.Exception e,
                            java.lang.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.


log

public abstract void log(java.lang.Exception e,
                         java.lang.String message)
                  throws LogException
Deprecated. 
Logs an Exception.

Throws:
LogException - if there is an error writing to the log.

log

public abstract void log(java.lang.String status)
                  throws LogException
Deprecated. 
Logs a status message.

Throws:
LogException - if there is an error writing to the log.

getDescription

public abstract java.lang.String getDescription()
Deprecated. 
Returns a description of where logged data are being stored. Implementing classes should return sufficient text to allow a human who reads this message to independently view information in the log (e.g. the file name, password for the database, etc.).


main

public static void main(java.lang.String[] args)
Deprecated. 


Copyright © 2001-2011 University Health Network. All Rights Reserved.