Class LoggingToolFactory
java.lang.Object
org.openscience.cdk.tools.LoggingToolFactory
Factory used to instantiate a
ILoggingTool. To get an instance, run:
public class SomeClass {
private static ILoggingTool logger;
static {
logger = LoggingToolFactory.createLoggingTool(SomeClass.class);
}
}
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ILoggingToolcreateLoggingTool(Class<?> sourceClass) Dynamically create aILoggingToolfor the givensourceClass.static Class<? extends ILoggingTool> Gets the currently usedILoggingToolimplementation.static voidsetLoggingToolClass(Class<? extends ILoggingTool> loggingTool) Sets theILoggingToolimplementation to be used.
-
Field Details
-
DEFAULT_LOGGING_TOOL_CLASS
Default logging tool. Currently, the slf4j based one.- See Also:
-
-
Constructor Details
-
LoggingToolFactory
public LoggingToolFactory()
-
-
Method Details
-
setLoggingToolClass
Sets theILoggingToolimplementation to be used.- Parameters:
loggingTool- The newILoggingTool.- See Also:
-
getLoggingToolClass
Gets the currently usedILoggingToolimplementation.- Returns:
- The currently used
ILoggingTool. - See Also:
-
createLoggingTool
Dynamically create aILoggingToolfor the givensourceClass.- Parameters:
sourceClass- Class for which theILoggingToolshould be constructed.- Returns:
- An
ILoggingToolimplementation.
-