|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.aselect.system.logging.AuthenticationLogger
public class AuthenticationLogger
Authentication logger.
Description:
This class implements a logger with the purpose of logging authentication
message to a system logger or a database.
Concurrency issues:
This class is thread-safe.
This class only writes log items and can therefore use one resource (e.g.
database connection).
Constructor Summary | |
---|---|
AuthenticationLogger()
Create a new default instance. |
Method Summary | |
---|---|
void |
closeHandlers()
Cleanup logger resources. |
void |
init(java.lang.String sComponent,
ConfigManager oConfigManager,
java.lang.Object oLogTargetConfig,
SystemLogger oSystemLogger)
Initializes the Authentication logger with a database back-end. |
void |
init(java.lang.String sComponent,
java.lang.String sLogFileNamePrefix,
java.lang.String sLoggerNamespace,
ConfigManager oConfigManager,
java.lang.Object oLogTargetConfig,
SystemLogger oSystemLogger,
java.lang.String sWorkingDir)
Initializes the Authentication logger with a file back-end. |
void |
log(java.lang.Object[] oLogFields)
Logs all objects in the supplied object array to the logging target. |
void |
log(java.lang.String sMessage)
Log a message. |
void |
log(java.lang.String sAction,
java.lang.String sUser,
java.lang.String sIP,
java.lang.String sAppID,
java.lang.String sMessage)
Write a log item. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AuthenticationLogger()
AuthenticationLogger
. If you use this
constructor you'll need to call one of the init() methods.
Method Detail |
---|
public void init(java.lang.String sComponent, java.lang.String sLogFileNamePrefix, java.lang.String sLoggerNamespace, ConfigManager oConfigManager, java.lang.Object oLogTargetConfig, SystemLogger oSystemLogger, java.lang.String sWorkingDir) throws ASelectException
SystemLogger
object and initializes it
with the configuration.null
null
null
null
sComponent
- The name of the A-Select component for which the
authentication logger is usedsLogFileNamePrefix
- The log file name prefix (".log" is appended).sLoggerNamespace
- The namespace of this system logger.oConfigManager
- The config manager used to retrieve the
configuration fromoLogTargetConfig
- The 'target' config section containing the file
configurationoSystemLogger
- The back-up logger that must be used to log any
errors if database logging failedsWorkingDir
- The workingdir that must be used when no directory is
configured
ASelectException
- if initializing failed (missing config items)public void init(java.lang.String sComponent, ConfigManager oConfigManager, java.lang.Object oLogTargetConfig, SystemLogger oSystemLogger) throws ASelectException
null
null
null
sComponent
- The name of the A-Select component for which the
authentication logger is usedoConfigManager
- The config manager used to retrieve the
configuration fromoLogTargetConfig
- The 'target' config section containing the
configurationoSystemLogger
- The back-up logger that must be used to log any
errors if database logging failed
ASelectException
- if initializing failed (missing config items)public void log(java.lang.String sAction, java.lang.String sUser, java.lang.String sIP, java.lang.String sAppID, java.lang.String sMessage)
AuthenticationLogger
is initialized.
sAction
- The action that should be logged.sUser
- The user that should be logged.sIP
- The remote IP address.sAppID
- The application id.sMessage
- The log message.public void log(java.lang.String sMessage)
AuthenticationLogger
is initialized.
sMessage
- The message to be logged.public void log(java.lang.Object[] oLogFields)
String
and the string will be logged to a
file.
oLogFields
- All objects that should be loggedpublic void closeHandlers()
SystemLogger.closeHandlers()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |