|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.partnersoft.core.LogFactory
public abstract class LogFactory
Standard, class-specific logging facility.
This facility, and the related Log, are designed to insulate Partner
code from the specific logging API used. See Log for a more complete
description.
The interface for this class was largely copied from the class of the same name in the jakarta commons logging project. However it does not internally depend upon reflection, custom class loaders, or any other advanced JVM tricks not available on limited platforms like J2ME. It is much simpler - it assumes the application initialization code has set a default factory.
This class is designed to be extended. Subclasses adapt the generic interface
to a specific logging implementation, handing out instances of Log.
Copyright 2006 Partner Software, Inc.
| Constructor Summary | |
|---|---|
protected |
LogFactory()
Protected constructor that is not available for public use. |
| Method Summary | |
|---|---|
static LogFactory |
getFactory()
Gets the default LogFactory implementation. |
Log |
instanceFor(java.lang.Class clazz)
Return a Log object for the given class. |
abstract Log |
instanceFor(java.lang.String name)
Returns the correct Log instance for the given name. |
static Log |
logFor(java.lang.Class clazz)
Convenience method to return a named logger, without the application having to care about factories. |
static Log |
logFor(java.lang.String name)
Convenience method to return a named logger, without the application having to care about factories. |
static void |
setFactory(LogFactory newDefault)
Sets the default LogFactory implementation. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected LogFactory()
| Method Detail |
|---|
public static LogFactory getFactory()
public static void setFactory(LogFactory newDefault)
public static Log logFor(java.lang.Class clazz)
clazz - Class from which a log name will be derived
org.apache.commons.logging.LogConfigurationException - if a suitable Log instance cannot be
returnedpublic static Log logFor(java.lang.String name)
name - Logical name of the Log instance to be returned
(the meaning of this name is only known to the underlying
logging implementation that is being wrapped)
org.apache.commons.logging.LogConfigurationException - if a suitable Log instance cannot be
returnedpublic Log instanceFor(java.lang.Class clazz)
public abstract Log instanceFor(java.lang.String name)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||