com.lyrisoft.util.io
Class Logger

java.lang.Object
  |
  +--java.lang.Thread
        |
        +--com.lyrisoft.util.io.Logger
All Implemented Interfaces:
java.lang.Runnable

public class Logger
extends java.lang.Thread


Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
Logger(java.io.PrintStream ps)
           
Logger(java.io.PrintWriter writer)
           
Logger(java.lang.String outputFile)
          Create a new Logger that logs to outputFile.
Logger(java.lang.String outputFile, boolean append)
          Create a new Logger that logs to outputFile.
 
Method Summary
 void close()
           
 void finalize()
           
 void log(java.lang.Exception e)
           
 void log(java.lang.String s)
           
 void run()
           
 void setEnabled(boolean b)
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Logger

public Logger(java.lang.String outputFile,
              boolean append)
       throws java.io.IOException
Create a new Logger that logs to outputFile. Will append if append is set to true. Otherwise, it will overwrite

Logger

public Logger(java.lang.String outputFile)
       throws java.io.IOException
Create a new Logger that logs to outputFile. Don't append. If the file exists, it will be overwritten

Logger

public Logger(java.io.PrintWriter writer)

Logger

public Logger(java.io.PrintStream ps)
Method Detail

run

public void run()
Overrides:
run in class java.lang.Thread

log

public void log(java.lang.String s)

log

public void log(java.lang.Exception e)

setEnabled

public void setEnabled(boolean b)

close

public void close()

finalize

public void finalize()
              throws java.lang.Throwable
Overrides:
finalize in class java.lang.Object


Copyright © 2000-2002 Taso Lyristis