|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.adventnet.afp.log.AbstractLogger
This class is the abstract class that implements the Logger interface. This class provides methods for listening mechanism. The registered listeners will be notified during any change in the Logger properties. It implements important methods provided by the Logger interface.
Logger
Field Summary | |
protected java.util.Vector |
listeners
|
protected int |
loggingLevel
|
Constructor Summary | |
AbstractLogger()
Creates a new AbstractLogger instance with the default Logger properties. |
Method Summary | |
void |
addPropertyChangeListener(java.beans.PropertyChangeListener listener)
This method is used to add the PropertyChangeListener to the Logger instance. |
java.lang.String |
getInstanceName()
To get the Instance Name of the Logger by which it is known. |
int |
getLogLevel()
The getLogLevel method is used to get the current Logging level of the Logger. |
void |
init(LoggerProperties loggerProps,
LogWriter logWriter)
The init method is used to intialize the logger. |
boolean |
removePropertyChangeListener(java.beans.PropertyChangeListener listener)
This method is used to remove the listener who does not want to get notified during any change in the properties of the Logger. |
void |
setLogLevel(int level)
The setLogLevel method is used to specify the Log level of the Logger. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.adventnet.afp.log.Logger |
err, err, out |
Field Detail |
protected int loggingLevel
protected java.util.Vector listeners
Constructor Detail |
public AbstractLogger()
AbstractLogger
instance with the default Logger properties.
Method Detail |
public void init(LoggerProperties loggerProps, LogWriter logWriter) throws LogException
init
method is used to intialize the logger. A logger will become active
and would start handling inputs only after it is initialized.
init
in interface Logger
loggerProps
- specifies the properties of the LoggerlogWriter
- a LogWriter
instance to which the Logger has to be associated.
LogException
- if an error occurs during initializationpublic void setLogLevel(int level)
setLogLevel
method is used to specify the Log level of the Logger.
Only messages whose Log level is less than or equal to the Logger's will be logged.
setLogLevel
in interface Logger
level
- an int
valuepublic int getLogLevel()
getLogLevel
method is used to get the current Logging level of the Logger.
getLogLevel
in interface Logger
int
valuepublic java.lang.String getInstanceName()
getInstanceName
in interface Logger
String
valuepublic void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
addPropertyChangeListener
in interface Logger
listener
- Listener who register for notification during any change in the properties.public boolean removePropertyChangeListener(java.beans.PropertyChangeListener listener)
removePropertyChangeListener
in interface Logger
listener
- Listener who unregister for notification during any change in properties.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |