Package edu.rit.util

Class PrintStreamLogger

java.lang.Object
edu.rit.util.PrintStreamLogger
All Implemented Interfaces:
Logger

public class PrintStreamLogger extends Object implements Logger
Class PrintStreamLogger provides an object that logs messages to a print stream.
Version:
16-Apr-2008
Author:
Alan Kaminsky
  • Constructor Details Link icon

    • PrintStreamLogger Link icon

      public PrintStreamLogger()
      Construct a new print stream logger that logs to System.err.
    • PrintStreamLogger Link icon

      public PrintStreamLogger(PrintStream out)
      Construct a new print stream logger that logs to the given print stream.
      Parameters:
      out - Print stream.
      Throws:
      NullPointerException - (unchecked exception) Thrown if out is null.
  • Method Details Link icon

    • log Link icon

      public void log(String msg)
      Log the given message.
      Specified by:
      log in interface Logger
      Parameters:
      msg - Message.
    • log Link icon

      public void log(Throwable exc)
      Log the given exception. Log the given exception.
      Specified by:
      log in interface Logger
      Parameters:
      exc - Exception.
    • log Link icon

      public void log(String msg, Throwable exc)
      Log the given message and exception. Log the given message and exception.
      Specified by:
      log in interface Logger
      Parameters:
      msg - Message.
      exc - Exception.
    • log Link icon

      public void log(long date, String msg)
      Log the given date and message.
      Specified by:
      log in interface Logger
      Parameters:
      date - Date and time in milliseconds since midnight 01-Jan-1970 UTC.
      msg - Message.
    • log Link icon

      public void log(long date, Throwable exc)
      Log the given date and exception. Log the given date and exception.
      Specified by:
      log in interface Logger
      Parameters:
      date - Date and time in milliseconds since midnight 01-Jan-1970 UTC.
      exc - Exception.
    • log Link icon

      public void log(long date, String msg, Throwable exc)
      Log the given date, message, and exception. Log the given date, message, and exception.
      Specified by:
      log in interface Logger
      Parameters:
      date - Date and time in milliseconds since midnight 01-Jan-1970 UTC.
      msg - Message.
      exc - Exception.