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

## org.apache.log4j.config
Class PropertyPrinter

    java.lang.Object
      org.apache.log4j.config.PropertyPrinter

All Implemented Interfaces:
  PropertyGetter.PropertyCallback

    public class PropertyPrinter

extends java.lang.Object
implements PropertyGetter.PropertyCallback

Prints the configuration of the log4j default hierarchy (which needs to be auto-initialized) as a propoperties file on a `PrintWriter`.

Author:
  Anders Kristensen

Field Summary
`protected java.util.Hashtable` | `appenderNames`
`protected boolean` | `doCapitalize`
`protected java.util.Hashtable` | `layoutNames`
`protected int` | `numAppenders`
`protected java.io.PrintWriter` | `out`

Constructor Summary
`PropertyPrinter(java.io.PrintWriter out)`
`PropertyPrinter(java.io.PrintWriter out, boolean doCapitalize)`

Method Summary
`static java.lang.String` | `capitalize(java.lang.String name)`
`void` | `foundProperty(java.lang.Object obj, java.lang.String prefix, java.lang.String name, java.lang.Object value)`
`protected java.lang.String` | `genAppName()`
`protected boolean` | `isGenAppName(java.lang.String name)` Returns true if the specified appender name is considered to have been generated, that is, if it is of the form A[0-9]+.
`static void` | `main(java.lang.String[] args)`
`void` | `print(java.io.PrintWriter out)` Prints the configuration of the default log4j hierarchy as a Java properties file on the specified Writer.
`protected void` | `printOptions(java.io.PrintWriter out, Category cat)`
`protected void` | `printOptions(java.io.PrintWriter out, Logger cat)`
`protected void` | `printOptions(java.io.PrintWriter out, java.lang.Object obj, java.lang.String fullname)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### numAppenders

    protected int numAppenders

### appenderNames

    protected java.util.Hashtable appenderNames

### layoutNames

    protected java.util.Hashtable layoutNames

### out

    protected java.io.PrintWriter out

### doCapitalize

    protected boolean doCapitalize

Constructor Detail

### PropertyPrinter

    public PropertyPrinter(java.io.PrintWriter out)

### PropertyPrinter

    public PropertyPrinter(java.io.PrintWriter out,
                           boolean doCapitalize)

Method Detail

### genAppName

    protected java.lang.String genAppName()

### isGenAppName

    protected boolean isGenAppName(java.lang.String name)

  Returns true if the specified appender name is considered to have been generated, that is, if it is of the form A[0-9]+.

### print

    public void print(java.io.PrintWriter out)

  Prints the configuration of the default log4j hierarchy as a Java properties file on the specified Writer.

  N.B. print() can be invoked only once!

### printOptions

    protected void printOptions(java.io.PrintWriter out,
                                Category cat)

### printOptions

    protected void printOptions(java.io.PrintWriter out,
                                Logger cat)

### printOptions

    protected void printOptions(java.io.PrintWriter out,
                                java.lang.Object obj,
                                java.lang.String fullname)

### foundProperty

    public void foundProperty(java.lang.Object obj,
                              java.lang.String prefix,
                              java.lang.String name,
                              java.lang.Object value)

  Specified by:
    `foundProperty` in interface `PropertyGetter.PropertyCallback`

### capitalize

    public static java.lang.String capitalize(java.lang.String name)

### main

    public static void main(java.lang.String[] args)

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

Copyright © 1999-2007 Apache Software Foundation. All Rights Reserved.