站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss 4.0.1 sp1 common API Documentation 英文版文档

LoggerWriter (JBoss/Common API) - JBoss 4.0.1 sp1 common API Documentation 英文版文档


org.jboss.logging.util
Class LoggerWriter

java.lang.Object
  extended byjava.io.Writer
      extended byjava.io.PrintWriter
          extended byorg.jboss.logging.util.LoggerWriter

public class LoggerWriter
extends PrintWriter

A subclass of PrintWriter that redirects its output to a log4j Logger.

This class is used to have something to give api methods that require a PrintWriter for logging. JBoss-owned classes of this nature generally ignore the PrintWriter and do their own log4j logging.

Version:
$$
Author:
David Jencks .

Field Summary
 
Fields inherited from class java.io.PrintWriter
out
 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
LoggerWriter(org.apache.log4j.Logger logger)
          Redirect logging to the indicated logger using Level.INFO
LoggerWriter(org.apache.log4j.Logger logger, org.apache.log4j.Level level)
          Redirect logging to the indicated logger using the given level.
 
Methods inherited from class java.io.PrintWriter
checkError, close, flush, print, print, print, print, print, print, print, print, print, println, println, println, println, println, println, println, println, println, println, setError, write, write, write, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoggerWriter

public LoggerWriter(org.apache.log4j.Logger logger)
Redirect logging to the indicated logger using Level.INFO

Parameters:
logger - Description of Parameter

LoggerWriter

public LoggerWriter(org.apache.log4j.Logger logger,
                    org.apache.log4j.Level level)
Redirect logging to the indicated logger using the given level. The ps is simply passed to super but is not used.

Parameters:
logger - Description of Parameter
level - Description of Parameter


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.