oracle.otnsamples.xmldb.simplebulkloader.common.trace.SystemLogger (Java2HTML)
/*
 * @author                 : Mark Drake
 * @version                : 1.0
 * Development Environment : Oracle9i JDeveloper
 * Name of the File        : SystemLogger.java

 * Creation / Modification History :
 *  Shefali Bansal    25-Jan-2003      Modified
 *  Modifications Made:
 *  1. Removed the unused log() method
 */

//Package name

package oracle.otnsamples.xmldb.simplebulkloader.common.trace;


//IO Imports
import java.io.PrintWriter;
import java.io.StringWriter;

/**

 * This class provides mechanism for logging the trace into a system console.
 * It implements the abstract class Logger
 */
public class SystemLogger implements Logger {
  public SystemLogger(  ) {
  }

  /**
   * Implements the abstract method log( String parm1 ). This method prints the

   * String information passed to it on the system console
   *
   * @param parm1 String message to be logged on the system console
   */
  public void log( String parm1 ) {
    System.out.println( parm1 );
  }

  /**
   * Implements the abstract method printStackTrace(). This method prints the

   * Stack trace information on the system console
   *
   * @param parm1 Stack trace information
   */
  public void printStackTrace( Throwable parm1 ) {
    StringWriter sw = new StringWriter(  );
    PrintWriter pw = new PrintWriter( sw );
    parm1.printStackTrace( pw );
    pw.close(  );
    log( sw.toString(  ) );
  }

}
E-mail this page
Printer View Printer View
Oracle Is The Information Company About Oracle | Oracle RSS Feeds | Careers | Contact Us | Site Maps | Legal Notices | Terms of Use | Privacy