|
Project Wonder 2.0 | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.log4j.Category org.apache.log4j.Logger er.extensions.ERXLogger
Custom subclass of Logger. The main reason for this class is to isolate the log4j dependency to only this class. This gives us the freedom in the future to switch logging systems and this should be the only effected class .. in theory.
Nested Class Summary | |
static class |
ERXLogger.Factory
LoggerFactory subclass that creates ERXLogger objects instead of the default Logger classes. |
Field Summary | |
static ERXLogger.Factory |
factory
|
static Logger |
log
logging supprt |
Fields inherited from class org.apache.log4j.Category |
additive, level, name, parent, repository, resourceBundle |
Constructor Summary | |
ERXLogger(String name)
Default constructor. |
Method Summary | |
static void |
configureLogging(Properties properties)
Sets up the logging system with the given configuration in Properties format. |
static void |
configureLoggingWithSystemProperties()
|
void |
debugStackTrace(Throwable throwable)
Dumps an Throwable's Stack trace on the appender if debugging is enabled. |
static ERXLogger |
getERXLogger(Class clazz)
Creates a logger for a given class object. |
static ERXLogger |
getERXLogger(Class clazz,
String subTopic)
Creates a logger for the given class object plus a restricting subtopic. |
static ERXLogger |
getERXLogger(String name)
Main entry point for getting an ERXLogger for a given name. |
static Logger |
getLogger(Class clazz)
|
static ERXLogger |
getLogger(Class clazz,
String subTopic)
|
static Logger |
getLogger(String name)
Overrides method of superclass to return a logger using our custom ERXLogger$Factory class. |
Methods inherited from class org.apache.log4j.Logger |
getLogger, getRootLogger |
Methods inherited from class org.apache.log4j.Category |
addAppender, assertLog, callAppenders, debug, debug, error, error, exists, fatal, fatal, forcedLog, getAdditivity, getAllAppenders, getAppender, getChainedPriority, getCurrentCategories, getDefaultHierarchy, getEffectiveLevel, getHierarchy, getInstance, getInstance, getLevel, getLoggerRepository, getName, getParent, getPriority, getResourceBundle, getResourceBundleString, getRoot, info, info, isAttached, isDebugEnabled, isEnabledFor, isInfoEnabled, l7dlog, l7dlog, log, log, log, removeAllAppenders, removeAppender, removeAppender, setAdditivity, setLevel, setPriority, setResourceBundle, shutdown, warn, warn |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static Logger log
public static ERXLogger.Factory factory
Constructor Detail |
public ERXLogger(String name)
name
- of the logging loggerMethod Detail |
public static ERXLogger getERXLogger(String name)
name
- to create the logger for
public static Logger getLogger(String name)
log4.Logger.getLogger
name
- to create the logger for
public static ERXLogger getERXLogger(Class clazz)
clazz
- Class object to create the logger for
public static Logger getLogger(Class clazz)
public static ERXLogger getERXLogger(Class clazz, String subTopic)
a.b.Foo
and you wanted to create a logger for the subtopic 'utilities' for
the class Foo then the created logging logger would have the path:
a.b.Foo.utilities
.
clazz
- Class object to create the logger forsubTopic
- to restrict the current logger to
public static ERXLogger getLogger(Class clazz, String subTopic)
public static void configureLoggingWithSystemProperties()
public static void configureLogging(Properties properties)
Properties
format.
properties
- with the logging configurationpublic void debugStackTrace(Throwable throwable)
throwable
- throwable to dump
|
Last updated: Do, Dez 9, 2004 12:46 PM CET | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |