com.adventnet.afp.log
Class LoggerProperties

java.lang.Object
  |
  +--com.adventnet.afp.log.LoggerProperties

public class LoggerProperties
extends java.lang.Object

It is a logical representation of a Logger and its properties. All the needed attributes of a Logger are grouped together. Any custom property can also be added to the Logger.


Constructor Summary
LoggerProperties(java.lang.String loggerInstanceName, java.lang.String logWriterInstanceName)
          Creates a new LoggerProperties instance with the InstanceName specified in loggerInstanceName.
 
Method Summary
 void addCustomProperty(java.lang.String key, java.lang.String value)
          This method can be used to add any other property which the user may need to use.
 java.lang.String getClassName()
          Gets the Logger implementation class that is being used by the Logger.
 java.util.Properties getCustomProperties()
          Returns custom properties that have been set for the Logger.
 java.lang.String getCustomProperty(java.lang.String key)
          The getCustomProperty method is used to retreive a custom property that has been set for the Logger.
 java.lang.String getInstanceName()
          Method to get the LoggerInstanceName.
 int getLogLevel()
          To get the logging level of the Logger.
 java.lang.String getWriterInstanceName()
          Method to get the LogWriterInstanceName.
 void removeCustomProperty(java.lang.String key)
          This method removes the custom property which has the key name same as that of the argument.
 void setClassName(java.lang.String loggerClassName)
          To set the Logger implementation class to be used by the Logger.
 void setLogLevel(int loggingLevel)
          To set the logging level of the Logger.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoggerProperties

public LoggerProperties(java.lang.String loggerInstanceName,
                        java.lang.String logWriterInstanceName)
Creates a new LoggerProperties instance with the InstanceName specified in loggerInstanceName.
Parameters:
loggerInstanceName - a String value
Method Detail

getInstanceName

public java.lang.String getInstanceName()
Method to get the LoggerInstanceName. It is the name with which the Logger will be identified.
Returns:
a String value

getWriterInstanceName

public java.lang.String getWriterInstanceName()
Method to get the LogWriterInstanceName. It is the name with which the LogWriter can be identified for the specified Logger.
Returns:
a String value

getClassName

public java.lang.String getClassName()
Gets the Logger implementation class that is being used by the Logger.
Returns:
a String value

setClassName

public void setClassName(java.lang.String loggerClassName)
To set the Logger implementation class to be used by the Logger. The logger class name cannot be null or empty. If it is given as null or empty, the class name which is set already is taken into consideration. By default, the LoggerImpl will used as the implementing class.
Parameters:
loggerClassName - a String value

getLogLevel

public int getLogLevel()
To get the logging level of the Logger.
Returns:
an int value

setLogLevel

public void setLogLevel(int loggingLevel)
To set the logging level of the Logger.
Parameters:
loggingLevel - an int value

addCustomProperty

public void addCustomProperty(java.lang.String key,
                              java.lang.String value)
This method can be used to add any other property which the user may need to use. Either key or the value should not be null or empty. If either the Key or value is null or empty, then this property will not be added.
Parameters:
key - a String value
value - a String value

removeCustomProperty

public void removeCustomProperty(java.lang.String key)
This method removes the custom property which has the key name same as that of the argument.
Parameters:
key - a String value

getCustomProperty

public java.lang.String getCustomProperty(java.lang.String key)
The getCustomProperty method is used to retreive a custom property that has been set for the Logger.
Parameters:
key - a String value
Returns:
a String value

getCustomProperties

public java.util.Properties getCustomProperties()
Returns custom properties that have been set for the Logger.
Returns:
a Properties value


Copyright (c)AdventNet Inc., 1996-2004