|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.plumtree.remote.logging.LogFactory
The LogFactory
is the starting point for the EDK Logging API, it offers static methods to
configure logging, query configuration properties, and obtain ILogger
instances.
Method Summary | |
static java.lang.String |
getApplicationName()
Gets the logging application name initialized or configured into the EDK logging framework, or empty string if logging is not initialized. |
static ILogger |
getLogger(java.lang.String componentName,
java.lang.Class loggingClass)
Returns a logger instance associated with the named component and the given class. |
static ILogger |
getLogger(java.lang.String componentName,
java.lang.String loggingLocation)
Returns a logger instance associated with the named component and the named location. |
static void |
initialize(java.lang.String loggingApplicationName,
boolean logToNetwork)
Initializes logging with the specified logging application name and whether or not to send log messages to receivers on the network. |
static boolean |
isInitialized()
Returns true if the EDK logging framework
has been initialized either from the logging
API or from external configuration. |
static boolean |
isLoggingToNetwork()
Returns true if the EDK logging framework
is configured to send log messages to receivers
on the local network, false if messages are only
sent to receivers on the local machine. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static ILogger getLogger(java.lang.String componentName, java.lang.Class loggingClass)
If logging is not initialized the framework will attempt to initialize logging from the external configuration file (web.xml / Web.config). If a value is found for the logging application name then the logging framework will be initialized before the logger instance is returned.
Any log messages sent to the logger before the logging framework is initialized will be discarded.
componentName
- a string identifying a category of related log messages.loggingClass
- a class instance specifying the location for this logger's messages.
ILogger
instance associated with the named component and the given class.
java.lang.IllegalArgumentException
- if logging is not already initialized and the underlying web configuration file has an invalid but non-empty logging application name.public static ILogger getLogger(java.lang.String componentName, java.lang.String loggingLocation)
If logging is not initialized the framework will attempt to initialize logging from the external configuration file (web.xml / Web.config). If a value is found for the logging application name then the logging framework will be initialized before the logger instance is returned.
Any log messages sent to the logger before the logging framework is initialized will be discarded.
componentName
- a string identifying a category of related log messages.loggingLocation
- a name specifying a class or specific location for this logger's messages.
ILogger
instance associated with the named component and the named location
java.lang.IllegalArgumentException
- if logging is not already initialized and the underlying web configuration file has an invalid but non-empty logging application name.public static void initialize(java.lang.String loggingApplicationName, boolean logToNetwork) throws java.lang.IllegalArgumentException, java.lang.IllegalStateException
If an external configuration file is present (web.xml / Web.config), the values set in the configuration file take priority over values passed in the parameters.
loggingApplicationName
- the identifier common to the log sender and receivers.
Must be 1-32 characters selected from ASCII alphanumerics plus period, hyphen, underscore, and space.logToNetwork
- true
if the log messages may be sent to remote receivers via the network,
false
if only local receivers will get messages.
java.lang.IllegalArgumentException
- when an improper value is passed for loggingApplicationName.
java.lang.IllegalStateException
- when the name and network logging parameters do not match the
values previously initialized via initialize() or from external configuration.public static boolean isInitialized()
true
if the EDK logging framework
has been initialized either from the logging
API or from external configuration. Log messages
sent to an uninitialized logger will be discarded.
true
if initialized, whether from API or from external configuration.public static boolean isLoggingToNetwork()
true
if the EDK logging framework
is configured to send log messages to receivers
on the local network, false
if messages are only
sent to receivers on the local machine.
true
if the logging framework is configured to send log messages to remote receivers over the network.public static java.lang.String getApplicationName()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright ©2007 BEA Systems, Inc. All Rights Reserved.