public class PropertyPrinter extends Object implements PropertyGetter.PropertyCallback
PrintWriter
.Modifier and Type | Field and Description |
---|---|
protected Hashtable |
appenderNames |
protected boolean |
doCapitalize |
protected Hashtable |
layoutNames |
protected int |
numAppenders |
protected PrintWriter |
out |
Constructor and Description |
---|
PropertyPrinter(PrintWriter out) |
PropertyPrinter(PrintWriter out,
boolean doCapitalize) |
Modifier and Type | Method and Description |
---|---|
static String |
capitalize(String name) |
void |
foundProperty(Object obj,
String prefix,
String name,
Object value) |
protected String |
genAppName() |
protected boolean |
isGenAppName(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(String[] args) |
void |
print(PrintWriter out)
Prints the configuration of the default log4j hierarchy as a Java properties file on the specified Writer.
|
protected void |
printOptions(PrintWriter out,
Category cat) |
protected void |
printOptions(PrintWriter out,
Logger cat) |
protected void |
printOptions(PrintWriter out,
Object obj,
String fullname) |
protected int numAppenders
protected Hashtable appenderNames
protected Hashtable layoutNames
protected PrintWriter out
protected boolean doCapitalize
public PropertyPrinter(PrintWriter out)
public PropertyPrinter(PrintWriter out, boolean doCapitalize)
protected String genAppName()
protected boolean isGenAppName(String name)
public void print(PrintWriter out)
N.B. print() can be invoked only once!
protected void printOptions(PrintWriter out, Category cat)
protected void printOptions(PrintWriter out, Logger cat)
protected void printOptions(PrintWriter out, Object obj, String fullname)
public void foundProperty(Object obj, String prefix, String name, Object value)
foundProperty
in interface PropertyGetter.PropertyCallback
public static void main(String[] args)
Copyright © 1999–2023 QOS.CH Sarl (Switzerland). All rights reserved.