Package org.openscience.cdk.tools
Class SystemOutLoggingTool
- java.lang.Object
-
- org.openscience.cdk.tools.SystemOutLoggingTool
-
- All Implemented Interfaces:
ILoggingTool
public class SystemOutLoggingTool extends Object implements ILoggingTool
Deprecated.should not be used directlyImplementation of theILoggingTool
interface that sends output to theSystem.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
Constructors Constructor Description SystemOutLoggingTool(Class<?> classInst)
Deprecated.Constructs a ILoggingTool which produces log lines indicating them to be for the given Class.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static ILoggingTool
create(Class<?> sourceClass)
Deprecated.Creates a newSystemOutLoggingTool
for the given class.void
debug(Object object)
Deprecated.Shows DEBUG output for the Object.void
debug(Object object, Object... objects)
Deprecated.Shows DEBUG output for the given Object's.void
dumpClasspath()
Deprecated.Outputs the system property for java.class.path.void
dumpSystemProperties()
Deprecated.Outputs system properties for the operating system and the java version.void
error(Object object)
Deprecated.Shows ERROR output for the Object.void
error(Object object, Object... objects)
Deprecated.Shows ERROR output for the given Object's.void
fatal(Object object)
Deprecated.Shows FATAL output for the Object.int
getLevel()
Deprecated.Get the current level of this logger.void
info(Object object)
Deprecated.Shows INFO output for the Object.void
info(Object object, Object... objects)
Deprecated.Shows INFO output for the given Object's.boolean
isDebugEnabled()
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
warn(Object object)
Deprecated.Shows WARN output for the Object.void
warn(Object object, Object... objects)
Deprecated.Shows WARN output for the given Object's.
-
-
-
Constructor Detail
-
SystemOutLoggingTool
public SystemOutLoggingTool(Class<?> classInst)
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 Detail
-
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:
ILoggingTool.DEFAULT_STACK_LENGTH
-
dumpClasspath
public void dumpClasspath()
Deprecated.Outputs the system property for java.class.path.- Specified by:
dumpClasspath
in interfaceILoggingTool
-
debug
public void debug(Object object)
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
public void debug(Object object, Object... objects)
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
public void error(Object object)
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
public void error(Object object, Object... objects)
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
public void fatal(Object object)
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
public void info(Object object)
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
public void info(Object object, Object... objects)
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
public void warn(Object object)
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
public void warn(Object object, Object... objects)
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
public static ILoggingTool create(Class<?> sourceClass)
Deprecated.Creates a newSystemOutLoggingTool
for the given class.- Parameters:
sourceClass
- Class for which logging messages are recorded.- Returns:
- A
SystemOutLoggingTool
.
-
setDebugEnabled
@Deprecated protected void setDebugEnabled(boolean enabled)
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
-
-