|
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.protomatter.syslog.xml.SyslogXML
A utility class for configuring Syslog from an XML file.
Method Summary | |
static boolean |
configure(org.jdom.Element syslogConfig)
Configure syslog from the given XML document. |
static void |
configure(java.io.File xmlFile)
Configure syslog from the given XML file. |
static void |
configure(java.io.File xmlFile,
java.lang.String saxDriverClass)
Configure syslog from the given XML file using the given JDom SAX driver class as a parser. |
static org.jdom.Document |
getConfiguration()
Get an XML representation of the current configuration state of Syslog including all loggers, etc. |
static void |
main(java.lang.String[] args)
Write an example XML configuration file to standard out. |
static void |
writeConfiguration(java.io.OutputStream out)
Get an XML representation of the current configuration state of Syslog including all loggers, etc and write it to the given output stream. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static void writeConfiguration(java.io.OutputStream out) throws java.io.IOException
public static org.jdom.Document getConfiguration()
public static void configure(java.io.File xmlFile) throws SyslogInitException
By default, this method will use the default SAX parser to parse the configuration file using JDom. If you wish to change the parser, you can specify the "Syslog.xml.parser" system property. That property should be set to the fully qualified class name of a SAX parser, such as "org.apache.xerces.parsers.SAXParser".
configure(Element element)
public static void configure(java.io.File xmlFile, java.lang.String saxDriverClass) throws SyslogInitException
configure(Element element)
public static boolean configure(org.jdom.Element syslogConfig) throws SyslogInitException
<Syslog defaultMask="DefaultSyslogLogMask" hostname="LocalHostName" flushThreadInterval="milliseconds" > <Logger name="LoggerName" class="LoggerClassName" > <!-- Logger directives --> </Logger> <!-- More loggers here --> </Syslog> |
Each logger is loaded and configured with it's Logger XML element. See the Javadoc for individual loggers for more information.
The default, system-wide log mask is set to be "at or above" the value of the defaultMask attribute (if present). The hostname that Syslog thinks is "local" is set to the value of the hostname attribute (if present).
If the flushThreadInterval attribute is set, it is interpreted as the number of milliseconds for a background thread to sleep between attempts to flush all the loggers.
BasicLogger
public static final void main(java.lang.String[] args)
configure(Element element)
|
Protomatter Classes v1.1.6 Copyright 1998-2001 Nate Sammons |
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Protomatter Classes v1.1.6 | http://protomatter.sourceforge.net/1.1.6 |