public class LoggingToolFactory extends Object
ILoggingTool
. To get an instance, run:
public class SomeClass { private static ILoggingTool logger; static { logger = LoggingToolFactory.createLoggingTool(SomeClass.class); } }
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_LOGGING_TOOL_CLASS
Default logging tool.
|
static String |
STDOUT_LOGGING_TOOL_CLASS
Back-up logging tool.
|
Constructor and Description |
---|
LoggingToolFactory() |
Modifier and Type | Method and Description |
---|---|
static ILoggingTool |
createLoggingTool(Class<?> sourceClass)
Dynamically create a
ILoggingTool for the given
sourceClass . |
static Class<? extends ILoggingTool> |
getLoggingToolClass()
Gets the currently used
ILoggingTool implementation. |
static void |
setLoggingToolClass(Class<? extends ILoggingTool> loggingTool)
Sets the
ILoggingTool implementation to be used. |
public static final String DEFAULT_LOGGING_TOOL_CLASS
public static final String STDOUT_LOGGING_TOOL_CLASS
public static void setLoggingToolClass(Class<? extends ILoggingTool> loggingTool)
ILoggingTool
implementation to be used.loggingTool
- The new ILoggingTool
.getLoggingToolClass()
public static Class<? extends ILoggingTool> getLoggingToolClass()
ILoggingTool
implementation.ILoggingTool
.setLoggingToolClass(Class)
public static ILoggingTool createLoggingTool(Class<?> sourceClass)
ILoggingTool
for the given
sourceClass
.sourceClass
- Class for which the ILoggingTool
should be
constructed.ILoggingTool
implementation.Copyright © 2018. All Rights Reserved.