Skip navigation links

Package com.enterprisedt.util.debug

Contains classes for logging functionality.

See: Description

Package com.enterprisedt.util.debug Description

Contains classes for logging functionality. The main class is Logger.

A number of logging levels are supported - FATAL,ERROR,WARN,INFO,DEBUG (as well as ALL and OFF, which are not really levels as such). Logging statements are made at a certain level, such as INFO, and the level for the library as a whole is set. If the overall level is equal to or higher (i.e. closer to DEBUG) than a particular logging call, the call is logged. For example, if a logging call is made at the DEBUG level and the overall level is set to INFO, it would not appear in the logs. If a logging call is made at WARN, and the overall level is set to INFO, it would appear in the logs.

Logging levels are encapsulated in the Level class. For example, the WARN level is represented by Level.WARN.

By default, all logging output is directed to the standard output stream (if it is equal to or less than the level set for the library). Appenders are supported, whereby output can be directed elsewhere. Currently, FileAppenders are the only implemented Appenders, which permit logging output to be directed to named files.

By default, the log level is switched to OFF, so that no logging will appear. The log level can be changed in two ways. Firstly, it can be changed explicitly by calling the setLevel() method on the Logger class.

A System property, edtftp.log.level, can also be used to set the logging level.

Full integration with log4j is possible. A System property, edtftp.log.log4j, is used to indicate that log4j integration should be attempted. It must be set to "true". Also, the log4j jar file must be available in the CLASSPATH. Once this is done all logging calls are directed via log4j, using reflection, and the standard log4j settings are used. More details on log4j can be found at the log4j site listed in the references.

System PropertyDescriptionValues
edtftp.log.levelControls the global logging levelFATAL,ERROR,WARN,INFO,DEBUG,ALL,OFF
edtftp.log.log4jControls log4j integration.true or false

Related Documentation

Skip navigation links

Copyright © 2001-2014 Enterprise Distributed Technologies Ltd. All Rights Reserved.