Package com.sun.identity.coretoken
Class TokenLogUtils
- java.lang.Object
-
- com.sun.identity.coretoken.TokenLogUtils
-
public class TokenLogUtils extends Object
TheTokenLogUtilsclass defines methods which are used by Core Token Service to write access and erro logs.
-
-
Field Summary
Fields Modifier and Type Field Description static StringEXPIRED_TOKEN_DELETE_SUCCESSstatic StringTOKEN_CREATE_SUCCESSstatic StringTOKEN_DELETE_SUCCESSstatic StringTOKEN_NAME_IDstatic StringTOKEN_READ_SUCCESSstatic StringTOKEN_SEARCH_SUCCESSstatic StringTOKEN_UPDATE_SUCCESSstatic StringUNABLE_TO_CREATE_TOKENstatic StringUNABLE_TO_DELETE_TOKENstatic StringUNABLE_TO_READ_TOKENstatic StringUNABLE_TO_SEARCH_TOKENstatic StringUNABLE_TO_UPDATE_TOKEN
-
Constructor Summary
Constructors Constructor Description TokenLogUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidaccess(Level level, String msgid, String[] data, SSOToken session, String nameId)Logs message to core token access logs.static voiderror(Level level, String msgid, String[] data, SSOToken session, String nameId)Logs error messages to core token error log.static booleanisAccessLoggable(Level level)Checks if an access message of the given level would actually be logged by this logger.static booleanisErrorLoggable(Level level)Checks if an error message of the given level would actually be logged by this logger.
-
-
-
Field Detail
-
TOKEN_CREATE_SUCCESS
public static final String TOKEN_CREATE_SUCCESS
- See Also:
- Constant Field Values
-
TOKEN_READ_SUCCESS
public static final String TOKEN_READ_SUCCESS
- See Also:
- Constant Field Values
-
TOKEN_UPDATE_SUCCESS
public static final String TOKEN_UPDATE_SUCCESS
- See Also:
- Constant Field Values
-
TOKEN_SEARCH_SUCCESS
public static final String TOKEN_SEARCH_SUCCESS
- See Also:
- Constant Field Values
-
TOKEN_DELETE_SUCCESS
public static final String TOKEN_DELETE_SUCCESS
- See Also:
- Constant Field Values
-
EXPIRED_TOKEN_DELETE_SUCCESS
public static final String EXPIRED_TOKEN_DELETE_SUCCESS
- See Also:
- Constant Field Values
-
UNABLE_TO_CREATE_TOKEN
public static final String UNABLE_TO_CREATE_TOKEN
- See Also:
- Constant Field Values
-
UNABLE_TO_READ_TOKEN
public static final String UNABLE_TO_READ_TOKEN
- See Also:
- Constant Field Values
-
UNABLE_TO_UPDATE_TOKEN
public static final String UNABLE_TO_UPDATE_TOKEN
- See Also:
- Constant Field Values
-
UNABLE_TO_SEARCH_TOKEN
public static final String UNABLE_TO_SEARCH_TOKEN
- See Also:
- Constant Field Values
-
UNABLE_TO_DELETE_TOKEN
public static final String UNABLE_TO_DELETE_TOKEN
- See Also:
- Constant Field Values
-
TOKEN_NAME_ID
public static final String TOKEN_NAME_ID
- See Also:
- Constant Field Values
-
-
Method Detail
-
access
public static void access(Level level, String msgid, String[] data, SSOToken session, String nameId)
Logs message to core token access logs.- 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)
- SEVERE (highest value)
msgid- the message or a message identifier.data- string array of dynamic data to be replaced in the message.session- the User's session objectnameId- value for NameID logging field
-
error
public static void error(Level level, String msgid, String[] data, SSOToken session, String nameId)
Logs error messages to core token error log.- 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)
- SEVERE (highest value)
msgid- the message or a message identifier.data- string array of dynamic data to be replaced in the message.session- the User's Session object.nameId- value for NameID logging field
-
isAccessLoggable
public static 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.- 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 static 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.- Parameters:
level- a message logging level defined in java.util.logging.Level.- Returns:
- true if the given message level is currently being logged.
-
-