| org.cougaar.util.log.LoggerController
All known Subclasses: org.cougaar.util.log.LoggerControllerProxy, org.cougaar.util.log.log4j.LoggerControllerImpl,
LoggerController | public interface LoggerController (Code) | | A controller for a single Logger, used to set the logging levels
and output destinations (console, files, etc).
This API is a bit kludgy -- it needs to be refactored into
a more "readable" API, including a refactoring of
LogTarget. For now I'm more concerned with the Logger
API, since it will be used by all developers, than this
LoggerController API.
|
Method Summary | |
void | addConsole() Add a console output type to this logger. | void | addLogTarget(int outputType, Object outputDevice) Add a logging destination.
Parameters: outputType - The LogTarget constant (CONSOLE, FILE, or STREAM). Parameters: outputDevice - The device associated with the particular outputtype being added. | Enumeration | getAllLoggerNames() Special "static" method to get the names of all loggers. | LogTarget[] | getLogTargets() Get an array of all LogTargets for this logger. | LoggerController | getLoggerController(String name) Special "static" method to get a named logger-controller. | int | getLoggingLevel() Get the logging level. | boolean | removeLogTarget(int outputType, Object outputDevice) Remove a logging output type.
Parameters: outputType - The LogTarget constant (CONSOLE, FILE, or STREAM) oflogging output to be removed. | boolean | removeLogTarget(int outputType, String deviceString) Remove a logging output type.
This method is usually used in conjunction with
LoggerController.getLogTargets() to
iterate through list to remove items.
Parameters: outputType - The LogTarget constant (CONSOLE, FILE, or STREAM) oflogging output to be removed. | void | setLoggingLevel(int level) Set the logging level. |
addConsole | void addConsole()(Code) | | Add a console output type to this logger.
This is equivalent to:
addLogTarget(LogTarget.CONSOLE, null);
|
addLogTarget | void addLogTarget(int outputType, Object outputDevice)(Code) | | Add a logging destination.
Parameters: outputType - The LogTarget constant (CONSOLE, FILE, or STREAM). Parameters: outputDevice - The device associated with the particular outputtype being added. Null for Console, filename for FILE, the actualoutput stream object for STREAM. |
getAllLoggerNames | Enumeration getAllLoggerNames()(Code) | | Special "static" method to get the names of all loggers.
This should be moved to a different interface...
|
getLogTargets | LogTarget[] getLogTargets()(Code) | | Get an array of all LogTargets for this logger.
return an array of
LogTarget representing all
the various logging destinations.
|
getLoggerController | LoggerController getLoggerController(String name)(Code) | | Special "static" method to get a named logger-controller.
This should be moved to a different interface...
|
getLoggingLevel | int getLoggingLevel()(Code) | | Get the logging level.
a Logger level constant (DEBUG, INFO, etc) See Also: Logger |
removeLogTarget | boolean removeLogTarget(int outputType, Object outputDevice)(Code) | | Remove a logging output type.
Parameters: outputType - The LogTarget constant (CONSOLE, FILE, or STREAM) oflogging output to be removed. See constants above. Parameters: outputDevice - The device associated with the particular outputtype being removed. Null for Console, filename for FILE, the actualoutput stream object for STREAM. |
removeLogTarget | boolean removeLogTarget(int outputType, String deviceString)(Code) | | Remove a logging output type.
This method is usually used in conjunction with
LoggerController.getLogTargets() to
iterate through list to remove items.
Parameters: outputType - The LogTarget constant (CONSOLE, FILE, or STREAM) oflogging output to be removed. See constants above. Parameters: deviceString - - The device associated with the particular outputtype being removed. Null for Console, filename for FILE,the String identifier name associated with the output stream. |
setLoggingLevel | void setLoggingLevel(int level)(Code) | | Set the logging level.
Parameters: level - Logger level constant (DEBUG, INFO, etc) See Also: Logger |
|
|