org.mortbay.log

Class LogStream

public class LogStream extends PrintStream

Divert a PrintStream to commons logging. The stderr and stdout streams can be diverted to logs named "stderr" and "stdout" using this class.
Nested Class Summary
static classLogStream.STDERR
static classLogStream.STDOUT
Constructor Summary
LogStream(String tag, Log log)
Method Summary
voidclose()
voidflush()
static booleangetLogStdErr()
static booleangetLogStdOut()
voidprintln()
voidprintln(boolean arg0)
voidprintln(char arg0)
voidprintln(char[] arg0)
voidprintln(double arg0)
voidprintln(float arg0)
voidprintln(int arg0)
voidprintln(long arg0)
voidprintln(Object arg0)
voidprintln(String arg0)
static voidsetLogStdErr(boolean log)
Log standard error stream.
static voidsetLogStdOut(boolean log)
Log standard output stream.
voidwrite(byte[] arg0, int arg1, int arg2)

Constructor Detail

LogStream

public LogStream(String tag, Log log)

Parameters: out autoflush

Method Detail

close

public void close()

flush

public void flush()

getLogStdErr

public static boolean getLogStdErr()

getLogStdOut

public static boolean getLogStdOut()

println

public void println()

println

public void println(boolean arg0)

println

public void println(char arg0)

println

public void println(char[] arg0)

println

public void println(double arg0)

println

public void println(float arg0)

println

public void println(int arg0)

println

public void println(long arg0)

println

public void println(Object arg0)

println

public void println(String arg0)

setLogStdErr

public static void setLogStdErr(boolean log)
Log standard error stream. If set to true, output to stderr will be directed to an instance of LogStream and logged. Beware of log loops from logs that write to stderr.

setLogStdOut

public static void setLogStdOut(boolean log)
Log standard output stream. If set to true, output to stdout will be directed to an instance of LogStream and logged. Beware of log loops from logs that write to stdout.

write

public void write(byte[] arg0, int arg1, int arg2)
Copyright © 2004 Mortbay Consulting Pty. Ltd. All Rights Reserved.