org.openeai.config
Class LoggerConfig
java.lang.Object
|
+--org.openeai.OpenEaiObject
|
+--org.openeai.config.EnterpriseConfigurationObjectImpl
|
+--org.openeai.config.LoggerConfig
- All Implemented Interfaces:
- EnterpriseConfigurationObject
- public class LoggerConfig
- extends EnterpriseConfigurationObjectImpl
- implements EnterpriseConfigurationObject
A LoggerConfig is a wrapper class that takes information stored in an OpenEAI
Deployment document (LoggerConfig Element) and stores it in a Java object.
Then the properties associated with the LoggerConfig are used to initialize
the static logger that all decendants of OpenEaiObject inherits. If an object
isn't a subclass of OpenEaiObject then it can use these properties to initialize
a log4j Category object itself. These properties are specified by Log4J.
Configuration Parameters:
These are the configuration parameters specified by the LoggerConfig
Element in the Deployment document. NOTE: The properties that need to be
specified are dictated by Log4J since that's the logging framework used
by OpenEAI. The parameters listed below are for a typical OpenEAI application.
For more information regarding Log4J properties, consult that documentation.
| Name |
Required |
Description |
| name |
yes |
Name of the LoggerConfig object. This is how the object will be
stored in AppConfig and should be unique. This allows developers to
conveniently categorize Loggers for an application if they wish to
use multiple loggers configured differently. Generally, the logger inherited
by all OpenEaiObject decendants sufices. |
| ConfigClass |
no* |
Name of the configuration class that wraps the config Element (this class) |
| Property |
yes (at least one) |
This is a pair of Elements that tells the LoggerConfig object what
Java Properties object to build that will be used to initialize the Log4J Category.
It consists of PropertyName and a PropertyValue
Elements that are stored in the Java Properties object. |
- Version:
- 3.0 beta2 - 28 January 2003
- Author:
- Tod Jackson (tod@openeai.org), Steve Wheat (steve@openeai.org)
|
Method Summary |
void |
init(org.jdom.Element configElement)
Implements the init(Element) method that all EnterpriseConfiguration objects must implement. |
| Methods inherited from class org.openeai.config.EnterpriseConfigurationObjectImpl |
addProperty, getAppName, getConfigDoc, getConfigElementByAttributeValue, getElementByAttributeValue, getName, getType, getValidation, setAppName, setConfigDoc, setName, setType, setValidation |
| Methods inherited from class org.openeai.OpenEaiObject |
addLog4jProperty, getDebug, getFromAddr, getLog4jProperties, getMailHost, getMailService, getProperties, getToAddr, initializeLog4j, initializeLog4j, initializeLog4j, setDebug, setFromAddr, setMailHost, setMailService, setProperties, setToAddr |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LoggerConfig
public LoggerConfig()
- Constructor
LoggerConfig
public LoggerConfig(java.lang.String configDocUrl,
java.lang.String loggerName)
throws EnterpriseConfigurationObjectException
LoggerConfig
public LoggerConfig(org.jdom.Element configElement)
throws EnterpriseConfigurationObjectException
init
public void init(org.jdom.Element configElement)
throws EnterpriseConfigurationObjectException
- Implements the init(Element) method that all EnterpriseConfiguration objects must implement.
This init method takes the Configuration element passed in and pulls out configuration information
specific to the static 'logger' being initialized.
When AppConfig detects that it's configuring the 'logger' it builds this config object and
passes the properties from it to the initializeLog4j method in OpenEaiObject.
- Specified by:
init in interface EnterpriseConfigurationObject
- Throws:
EnterpriseConfigurationObjectException - if errors occur processing the configuration Element.
Copyright © 2002, OpenEAI Software Foundation