marf.util
Class Logger.LogPrintStream

java.lang.Object
  extended by java.io.OutputStream
      extended by java.io.FilterOutputStream
          extended by java.io.PrintStream
              extended by marf.util.Logger.LogPrintStream
All Implemented Interfaces:
java.io.Closeable, java.io.Flushable, java.lang.Appendable
Enclosing class:
Logger

public class Logger.LogPrintStream
extends java.io.PrintStream

Our own LogPrintStream for log delivery.

Author:
Serguei Mokhov

Field Summary
protected  Logger.LogPrintStream oLPS
          Internal instance of log stream that might point to a file, STDOUT or STDERR.
 
Fields inherited from class java.io.FilterOutputStream
out
 
Constructor Summary
Logger.LogPrintStream(java.io.OutputStream poOutputStream)
          Defaults output to the stream specified in the parameter.
Logger.LogPrintStream(java.io.OutputStream poOutputStream, Logger.LogPrintStream poLogPrintStream)
          Sets the output to go to the two destinations of the first and second parameters.
Logger.LogPrintStream(java.lang.String pstrFilename)
          Default output is to a file.
 
Method Summary
 void println(java.lang.Object poMessage)
          Object to log.
 void println(java.lang.String pstrMessage)
          Issues a log message to the parent and possibly contained instance of itself.
 
Methods inherited from class java.io.PrintStream
append, append, append, append, append, append, checkError, close, flush, format, format, print, print, print, print, print, print, print, print, print, printf, printf, println, println, println, println, println, println, println, println, setError, write, write
 
Methods inherited from class java.io.FilterOutputStream
write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

oLPS

protected Logger.LogPrintStream oLPS
Internal instance of log stream that might point to a file, STDOUT or STDERR.

Constructor Detail

Logger.LogPrintStream

public Logger.LogPrintStream(java.lang.String pstrFilename)
                      throws java.lang.Exception
Default output is to a file.

Parameters:
pstrFilename - filename of a file to log to
Throws:
java.lang.Exception - if the are problems with file operations

Logger.LogPrintStream

public Logger.LogPrintStream(java.io.OutputStream poOutputStream)
Defaults output to the stream specified in the parameter.

Parameters:
poOutputStream - stream to log to

Logger.LogPrintStream

public Logger.LogPrintStream(java.io.OutputStream poOutputStream,
                             Logger.LogPrintStream poLogPrintStream)
Sets the output to go to the two destinations of the first and second parameters.

Parameters:
poOutputStream - possibly a file or STDOUT/STDERR
poLogPrintStream - possibly a file or STDOUT/STDERR
Method Detail

println

public void println(java.lang.String pstrMessage)
Issues a log message to the parent and possibly contained instance of itself.

Overrides:
println in class java.io.PrintStream
Parameters:
pstrMessage - log message to log
See Also:
PrintStream.println(java.lang.String)

println

public void println(java.lang.Object poMessage)
Object to log.

Overrides:
println in class java.io.PrintStream
See Also:
PrintStream.println(java.lang.Object)


SourceForge Logo