Package org.openscience.cdk.tools
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); } }
- Source code:
- main
- Belongs to CDK module:
- core
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ILoggingTool
createLoggingTool
(Class<?> sourceClass) Dynamically create aILoggingTool
for the givensourceClass
.static Class<? extends ILoggingTool>
Gets the currently usedILoggingTool
implementation.static void
setLoggingToolClass
(Class<? extends ILoggingTool> loggingTool) Sets theILoggingTool
implementation 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 theILoggingTool
implementation to be used.- Parameters:
loggingTool
- The newILoggingTool
.- See Also:
-
getLoggingToolClass
Gets the currently usedILoggingTool
implementation.- Returns:
- The currently used
ILoggingTool
. - See Also:
-
createLoggingTool
Dynamically create aILoggingTool
for the givensourceClass
.- Parameters:
sourceClass
- Class for which theILoggingTool
should be constructed.- Returns:
- An
ILoggingTool
implementation.
-