soap tutorial

adriani.jws.template.util
Interface LoggerManager

All Known Implementing Classes:
ExternalLogger, SystemLogger

public interface LoggerManager

General interface for defining, setting and handling the log mechanism.


Method Summary
 boolean close()
          Close the logger by closing all related handlers.
 void createLogger(java.lang.String path, java.util.logging.Level level, boolean mode)
          This method is a placeholder for subclasses relying on a stand alone logging mechanism, like the SystemLogger class.
 java.lang.String getParentDir(java.lang.Object logger)
          Return the parentDir path used as base directory to locate the log file.
 RotateThread getRotateThread()
          Return the RotateThread object (if any) used to rotate the log file.
 java.lang.String getRotationTime(java.lang.Object logger)
          Return the rotation time set for this logger, already formatted and ready to print.
 void init(java.lang.String path, java.lang.String logLevel, int rotate, boolean mode)
          The main method to be called to initialize the log mechanism.
 void rotate()
          This method is a placeholder for subclasses relying on a stand alone logging mechanism, like the SystemLogger class.
 

Method Detail

init

void init(java.lang.String path,
          java.lang.String logLevel,
          int rotate,
          boolean mode)
The main method to be called to initialize the log mechanism.
Depending by subclass implementation this method can create a stand alone file system logger object, (writing directly on the file system) or configure an external logging module (like apache.log4j). In the first case the input parameters could be required or optional, depending by the subclass implementation. In the second case the input parameters can be null, since the log4j mechanism relies on an external configuration file.

Parameters:
path - an ALREADY existing path from which logging folders must be created
logLevel - the logging minimal level as a String (INFO, WARNING or SEVERE)
rotate - the timeout (in minutes) for rotation of the log file
mode - if true initializes the standard log file, if false initializes the benchmark analysis file

createLogger

void createLogger(java.lang.String path,
                  java.util.logging.Level level,
                  boolean mode)
This method is a placeholder for subclasses relying on a stand alone logging mechanism, like the SystemLogger class. If the logging feature is performed by an external module, for example the apache.log4j package, implementation of this method is not required.

Parameters:
path - the path reference for the log file
level - the logging minimal level as a Logger.Level value (INFO, WARNING or SEVERE)
mode - if true creates the standard log file, if false creates the benchmark analysis file
See Also:
SystemLogger.getLogFile(String optionalPath, boolean mode)

rotate

void rotate()
This method is a placeholder for subclasses relying on a stand alone logging mechanism, like the SystemLogger class. If the logging feature is performed by an external module, for example the apache.log4j package, implementation of this method is not required.

See Also:
RotateThread

close

boolean close()
Close the logger by closing all related handlers. The rotation thread will end just another cycle, then will exit. This method should be required only by the SystemLogger class.


getParentDir

java.lang.String getParentDir(java.lang.Object logger)
Return the parentDir path used as base directory to locate the log file.

Parameters:
logger - a valid general Logger instance
Returns:
the current parent directory for logging on the file system

getRotateThread

RotateThread getRotateThread()
Return the RotateThread object (if any) used to rotate the log file.

Returns:
a reference to the RotateThread object (if used)

getRotationTime

java.lang.String getRotationTime(java.lang.Object logger)
Return the rotation time set for this logger, already formatted and ready to print.

Parameters:
logger - a valid general Logger instance
Returns:
a string describing the rotation time set for this logger

Build 18/09/2012

Morpheus Quality Technologies - Making the Zion software
Copyright © 2009-2013 Morpheus Quality Technologies. All Rights Reserved