Package com.jalios.jcms.logging
Class Log4jPrintStream
- java.lang.Object
-
- java.io.OutputStream
-
- java.io.FilterOutputStream
-
- java.io.PrintStream
-
- com.jalios.jcms.logging.Log4jPrintStream
-
- All Implemented Interfaces:
java.io.Closeable
,java.io.Flushable
,java.lang.Appendable
,java.lang.AutoCloseable
public class Log4jPrintStream extends java.io.PrintStream
A PrintStream that flushes out to a log4j Category.
-
-
Constructor Summary
Constructors Constructor Description Log4jPrintStream(org.apache.log4j.Logger log, org.apache.log4j.Level level)
Creates the Log4jPrintStream to flush to the given Category.
-
Method Summary
-
Methods inherited from class java.io.PrintStream
append, append, append, checkError, clearError, close, flush, format, format, print, print, print, print, print, print, print, print, print, printf, printf, println, println, println, println, println, println, println, println, println, println, setError, write, write
-
-
-
-
Constructor Detail
-
Log4jPrintStream
public Log4jPrintStream(org.apache.log4j.Logger log, org.apache.log4j.Level level) throws java.lang.IllegalArgumentException
Creates the Log4jPrintStream to flush to the given Category.- Parameters:
log
- the Logger to write tolevel
- the Level to use when writing to the Logger- Throws:
java.lang.IllegalArgumentException
- if cat == null or priority == null
-
-