org.jboss.logging
Class LogWriter

java.lang.Object
  |
  +--java.io.Writer
        |
        +--java.io.PrintWriter
              |
              +--org.jboss.logging.LogWriter

public class LogWriter
extends java.io.PrintWriter

Allows you to log by writing to a PrintWriter. Can't just wrap a LogStream since writer doesn't actually call println on the underlying stream. But we are guaranteed that print and println calls here go through the write(String) method.


Fields inherited from class java.io.PrintWriter
out
 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
LogWriter(Log log)
          Creates a new writer for the specified log.
 
Method Summary
 void flush()
          Override to do nothing.
 void println()
          Override to do nothing.
 void write(char[] p0)
          Override to do nothing.
 void write(char[] p0, int p1, int p2)
          Override to do nothing.
 void write(int p0)
          Override to do nothing.
 void write(java.lang.String p0)
          All the print and println calls go through this method, so it's the one that does the logging.
 void write(java.lang.String p0, int p1, int p2)
          Override to do nothing.
 
Methods inherited from class java.io.PrintWriter
checkError, close, print, print, print, print, print, print, print, print, print, println, println, println, println, println, println, println, println, println, setError
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogWriter

public LogWriter(Log log)
Creates a new writer for the specified log.
Parameters:
log - The log to send messages to. If null, the default log will be used.
Method Detail

flush

public void flush()
Override to do nothing.
Overrides:
flush in class java.io.PrintWriter

println

public void println()
Override to do nothing.
Overrides:
println in class java.io.PrintWriter

write

public void write(int p0)
Override to do nothing.
Overrides:
write in class java.io.PrintWriter

write

public void write(java.lang.String p0)
All the print and println calls go through this method, so it's the one that does the logging.
Overrides:
write in class java.io.PrintWriter

write

public void write(java.lang.String p0,
                  int p1,
                  int p2)
Override to do nothing.
Overrides:
write in class java.io.PrintWriter

write

public void write(char[] p0)
Override to do nothing.
Overrides:
write in class java.io.PrintWriter

write

public void write(char[] p0,
                  int p1,
                  int p2)
Override to do nothing.
Overrides:
write in class java.io.PrintWriter


Copyright © 2000 The JBoss Organization. All Rights Reserved.