Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jboss.logging.log4j
Class CategoryStream

    java.lang.Object
      |
      +--java.io.OutputStream
            |
            +--java.io.FilterOutputStream
                  |
                  +--java.io.PrintStream
                        |
                        +--org.jboss.logging.log4j.CategoryStream

public class CategoryStream
extends java.io.PrintStream

A subclass of PrintStream that redirects its output to a log4j Category. This class is used to map PrintStream/PrintWriter oriented logging onto the log4j Categories. Examples include capturing System.out/System.err writes.

Version:
  $Revision: 1.3.2.3 $
Author:
  Scott.Stark@jboss.org

Fields inherited from class java.io.FilterOutputStream
`out`

Constructor Summary
`CategoryStream(org.apache.log4j.Category category)` Redirect logging to the indicated category using Priority.INFO
`CategoryStream(org.apache.log4j.Category category, org.apache.log4j.Priority priority, java.io.PrintStream ps)` Redirect logging to the indicated category using the given priority.

Method Summary
`void` | `println(java.lang.Object msg)`
`void` | `println(java.lang.String msg)`
`void` | `write(byte b)`
`void` | `write(byte[] b, int off, int len)`

Methods inherited from class java.io.PrintStream
`checkError, close, flush, print, print, print, print, print, print, print, print, print, println, println, println, println, println, println, println, println, setError, 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`

Constructor Detail

### CategoryStream

    public CategoryStream(org.apache.log4j.Category category)

  Redirect logging to the indicated category using Priority.INFO

### CategoryStream

    public CategoryStream(org.apache.log4j.Category category,
                          org.apache.log4j.Priority priority,
                          java.io.PrintStream ps)

  Redirect logging to the indicated category using the given priority. The ps is simply passed to super but is not used.

Method Detail

### println

    public void println(java.lang.String msg)

  Overrides:
    `println` in class `java.io.PrintStream`

### println

    public void println(java.lang.Object msg)

  Overrides:
    `println` in class `java.io.PrintStream`

### write

    public void write(byte b)

### write

    public void write(byte[] b,
                      int off,
                      int len)

  Overrides:
    `write` in class `java.io.PrintStream`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000 The JBoss Organization. All Rights Reserved.