Package org.openscience.cdk.tools
Class SystemOutLoggingTool
java.lang.Object
org.openscience.cdk.tools.SystemOutLoggingTool
- All Implemented Interfaces:
ILoggingTool
Deprecated.
should not be used directly
Implementation of the
ILoggingTool
interface that sends output to
the System.err
channel.- Source code:
- main
- Belongs to CDK module:
- core
-
Field Summary
Fields inherited from interface org.openscience.cdk.tools.ILoggingTool
DEBUG, DEFAULT_STACK_LENGTH, ERROR, FATAL, INFO, OFF, TRACE, WARN
-
Constructor Summary
ConstructorsConstructorDescriptionSystemOutLoggingTool
(Class<?> classInst) Deprecated.Constructs a ILoggingTool which produces log lines indicating them to be for the given Class. -
Method Summary
Modifier and TypeMethodDescriptionstatic ILoggingTool
Deprecated.Creates a newSystemOutLoggingTool
for the given class.void
Deprecated.Shows DEBUG output for the Object.void
Deprecated.Shows DEBUG output for the given Object's.void
Deprecated.Outputs the system property for java.class.path.void
Deprecated.Outputs system properties for the operating system and the java version.void
Deprecated.Shows ERROR output for the Object.void
Deprecated.Shows ERROR output for the given Object's.void
Deprecated.Shows FATAL output for the Object.int
getLevel()
Deprecated.Get the current level of this logger.void
Deprecated.Shows INFO output for the Object.void
Deprecated.Shows INFO output for the given Object's.boolean
Deprecated.Use this method for computational demanding debug info.protected void
setDebugEnabled
(boolean enabled) Deprecated.usesetLevel(int)
void
setLevel
(int level) Deprecated.Set the level of this logger.void
setStackLength
(int length) Deprecated.Sets the number of StackTraceElements to be printed in DEBUG mode when callingdebug(Throwable)
.void
Deprecated.Shows WARN output for the Object.void
Deprecated.Shows WARN output for the given Object's.
-
Constructor Details
-
SystemOutLoggingTool
Deprecated.Constructs a ILoggingTool which produces log lines indicating them to be for the given Class.- Parameters:
classInst
- Class from which the log messages originate
-
-
Method Details
-
dumpSystemProperties
public void dumpSystemProperties()Deprecated.Outputs system properties for the operating system and the java version. More specifically: os.name, os.version, os.arch, java.version and java.vendor.- Specified by:
dumpSystemProperties
in interfaceILoggingTool
-
setStackLength
public void setStackLength(int length) Deprecated.Sets the number of StackTraceElements to be printed in DEBUG mode when callingdebug(Throwable)
. The default value is DEFAULT_STACK_LENGTH.- Specified by:
setStackLength
in interfaceILoggingTool
- Parameters:
length
- the new stack length- See Also:
-
dumpClasspath
public void dumpClasspath()Deprecated.Outputs the system property for java.class.path.- Specified by:
dumpClasspath
in interfaceILoggingTool
-
debug
Deprecated.Shows DEBUG output for the Object. If the object is an instanceofThrowable
it will output the trace. Otherwise it will use the toString() method.- Specified by:
debug
in interfaceILoggingTool
- Parameters:
object
- Object to apply toString() too and output
-
debug
Deprecated.Shows DEBUG output for the given Object's. It uses the toString() method to concatenate the objects.- Specified by:
debug
in interfaceILoggingTool
- Parameters:
object
- Object to apply toString() too and outputobjects
- Object... to apply toString() too and output
-
error
Deprecated.Shows ERROR output for the Object. It uses the toString() method.- Specified by:
error
in interfaceILoggingTool
- Parameters:
object
- Object to apply toString() too and output
-
error
Deprecated.Shows ERROR output for the given Object's. It uses the toString() method to concatenate the objects.- Specified by:
error
in interfaceILoggingTool
- Parameters:
object
- Object to apply toString() too and outputobjects
- Object... to apply toString() too and output
-
fatal
Deprecated.Shows FATAL output for the Object. It uses the toString() method.- Specified by:
fatal
in interfaceILoggingTool
- Parameters:
object
- Object to apply toString() too and output
-
info
Deprecated.Shows INFO output for the Object. It uses the toString() method.- Specified by:
info
in interfaceILoggingTool
- Parameters:
object
- Object to apply toString() too and output
-
info
Deprecated.Shows INFO output for the given Object's. It uses the toString() method to concatenate the objects.- Specified by:
info
in interfaceILoggingTool
- Parameters:
object
- Object to apply toString() too and outputobjects
- Object... to apply toString() too and output
-
warn
Deprecated.Shows WARN output for the Object. It uses the toString() method.- Specified by:
warn
in interfaceILoggingTool
- Parameters:
object
- Object to apply toString() too and output
-
warn
Deprecated.Shows WARN output for the given Object's. It uses the toString() method to concatenate the objects.- Specified by:
warn
in interfaceILoggingTool
- Parameters:
object
- Object to apply toString() too and outputobjects
- Object... to apply toString() too and output
-
isDebugEnabled
public boolean isDebugEnabled()Deprecated.Use this method for computational demanding debug info. For example:if (logger.isDebugEnabled()) { logger.info("The 1056389822th prime that is used is: ", calculatePrime(1056389822)); }
- Specified by:
isDebugEnabled
in interfaceILoggingTool
- Returns:
- true, if debug is enabled
-
create
Deprecated.Creates a newSystemOutLoggingTool
for the given class.- Parameters:
sourceClass
- Class for which logging messages are recorded.- Returns:
- A
SystemOutLoggingTool
.
-
setDebugEnabled
Deprecated.usesetLevel(int)
Protected method which must not be used, except for testing purposes. -
setLevel
public void setLevel(int level) Deprecated.Set the level of this logger. The level is provided in one of the constants:ILoggingTool.TRACE
,ILoggingTool.DEBUG
,ILoggingTool.INFO
,ILoggingTool.WARN
,ILoggingTool.ERROR
,ILoggingTool.FATAL
. After setting the level only messages above the specified level will be emitted.- Specified by:
setLevel
in interfaceILoggingTool
- Parameters:
level
- the level
-
getLevel
public int getLevel()Deprecated.Get the current level of this logger. The level is provided in one of the constants:ILoggingTool.TRACE
,ILoggingTool.DEBUG
,ILoggingTool.INFO
,ILoggingTool.WARN
,ILoggingTool.ERROR
,ILoggingTool.FATAL
.- Specified by:
getLevel
in interfaceILoggingTool
- Returns:
- the current level
-