Package com.sun.identity.plugin.log.impl
Class FedletLogger
- java.lang.Object
-
- com.sun.identity.plugin.log.impl.FedletLogger
-
-
Field Summary
Fields Modifier and Type Field Description protected Logger
accessLogger
protected Logger
errorLogger
-
Constructor Summary
Constructors Constructor Description FedletLogger()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
access(Level level, String messageId, String[] data, Object session)
Logs message to the access logs.void
access(Level level, String messageId, String[] data, Object session, Map props)
Writes access to a component into a log.void
error(Level level, String messageId, String[] data, Object session)
Logs error messages to the error logs.void
error(Level level, String messageId, String[] data, Object session, Map props)
Writes error occurred in a component into a log.void
init(String componentName)
Initializes the logging for the component.boolean
isAccessLoggable(Level level)
Checks if an access message of the given level would actually be logged by this logger.boolean
isErrorLoggable(Level level)
Checks if an error message of the given level would actually be logged by this logger.boolean
isLogEnabled()
Returnstrue
if logging is enabled.
-
-
-
Method Detail
-
init
public void init(String componentName) throws LogException
Initializes the logging for the component.- Specified by:
init
in interfaceLogger
- Parameters:
componentName
- the component name.- Throws:
LogException
- if there is an error during initialization.
-
access
public void access(Level level, String messageId, String[] data, Object session) throws LogException
Logs message to the access logs.- Specified by:
access
in interfaceLogger
- Parameters:
level
- the log level , these are based on those defined in java.util.logging.Level, the values for level can be any one of the following :
- SEVERE (highest value)
- WARNING
- INFO
- CONFIG
- FINE
- FINER
- FINEST (lowest value)
messageId
- the message or a message identifier.data
- string array of dynamic data to be replaced in the message.session
- the User's session object- Throws:
LogException
- if there is an error.
-
access
public void access(Level level, String messageId, String[] data, Object session, Map props) throws LogException
Writes access to a component into a log.- Specified by:
access
in interfaceLogger
- Parameters:
level
- indicating log levelmessageId
- Message iddata
- string array of dynamic data only known during run timesession
- Session object (it could be null)props
- representing log record columns- Throws:
LogException
- if there is an error.
-
error
public void error(Level level, String messageId, String[] data, Object session) throws LogException
Logs error messages to the error logs.- Specified by:
error
in interfaceLogger
- Parameters:
level
- the log level , these are based on those defined in java.util.logging.Level, the values for level can be any one of the following :
- SEVERE (highest value)
- WARNING
- INFO
- CONFIG
- FINE
- FINER
- FINEST (lowest value)
messageId
- the message or a message identifier.data
- string array of dynamic data to be replaced in the message.session
- the User's Session object.- Throws:
LogException
- if there is an error.
-
error
public void error(Level level, String messageId, String[] data, Object session, Map props) throws LogException
Writes error occurred in a component into a log.- Specified by:
error
in interfaceLogger
- Parameters:
level
- indicating log levelmessageId
- Message iddata
- string array of dynamic data only known during run timesession
- Session object (it could be null)props
- log record columns- Throws:
LogException
- if there is an error.
-
isLogEnabled
public boolean isLogEnabled()
Returnstrue
if logging is enabled.- Specified by:
isLogEnabled
in interfaceLogger
- Returns:
true
if logging is enabled.
-
isAccessLoggable
public boolean isAccessLoggable(Level level)
Checks if an access message of the given level would actually be logged by this logger. This check is based on the Logger's effective level.- Specified by:
isAccessLoggable
in interfaceLogger
- Parameters:
level
- a message logging level defined in java.util.logging.Level.- Returns:
- true if the given message level is currently being logged.
-
isErrorLoggable
public boolean isErrorLoggable(Level level)
Checks if an error message of the given level would actually be logged by this logger. This check is based on the Logger's effective level.- Specified by:
isErrorLoggable
in interfaceLogger
- Parameters:
level
- a message logging level defined in java.util.logging.Level.- Returns:
- true if the given message level is currently being logged.
-
-