Package com.sun.identity.log
Class LogRecord
- java.lang.Object
-
- java.util.logging.LogRecord
-
- com.sun.identity.log.LogRecord
-
- All Implemented Interfaces:
ILogRecord,Serializable
public class LogRecord extends LogRecord implements ILogRecord
Extension to the JDK1.4LogRecordto include thelogInfoHashMapand methods to store and retrieve data from thislogInfoMap. ThelogInfoMap is supposed to be used by the client to fill in log-details which will be used by the Formatter to construct the actual log string. ForJDK1.4LogRecordplease refer tohttp://java.sun.com/j2se/1.4.1/docs/api/java/util/logging/LogRecord.html
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description LogRecord(Level level, String msg)Construct theLogRecordwith the given Level and message values.LogRecord(Level level, String msg, Object token)Construct theLogRecordwith the given Level and message values.LogRecord(Level level, String msg, Hashtable properties)Constructor for auth logging
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddLogInfo(String key, Object value)Adds to the log information map, the field key and its corresponding value.voidaddTimeLogInfo(Date date)Sets theLogConstants.TIMEfor thisLogRecordto the provided date.ObjectgetLogBy()Returns log by subject.ObjectgetLogFor()Returns log for subject.MapgetLogInfoMap()Returns the log information map which contains the set of fields and their corresponding values.voidsetLogInfoMap(Map logInfoMap)Convenience method to set the log information map.-
Methods inherited from class java.util.logging.LogRecord
getInstant, getLevel, getLoggerName, getMessage, getMillis, getParameters, getResourceBundle, getResourceBundleName, getSequenceNumber, getSourceClassName, getSourceMethodName, getThreadID, getThrown, setInstant, setLevel, setLoggerName, setMessage, setMillis, setParameters, setResourceBundle, setResourceBundleName, setSequenceNumber, setSourceClassName, setSourceMethodName, setThreadID, setThrown
-
-
-
-
Constructor Detail
-
LogRecord
public LogRecord(Level level, String msg)
Construct theLogRecordwith the given Level and message values.- Parameters:
level- The log Levelmsg- The message string
-
LogRecord
public LogRecord(Level level, String msg, Object token)
Construct theLogRecordwith the given Level and message values.- Parameters:
level- The log Level.msg- The message string.token- The single sign-on token which will be used to fill in details like client IP address into theLogRecord.
-
-
Method Detail
-
addLogInfo
public void addLogInfo(String key, Object value)
Adds to the log information map, the field key and its corresponding value.- Specified by:
addLogInfoin interfaceILogRecord- Parameters:
key- The key which will be used by the formatter to determine if this piece of info is supposed to be added to the log string according to the selected log fields.value- The value which may form a part of the actual log-string.
-
addTimeLogInfo
public void addTimeLogInfo(Date date)
Sets theLogConstants.TIMEfor thisLogRecordto the provided date.- Parameters:
date- The timestamp to use for this log record.
-
setLogInfoMap
public void setLogInfoMap(Map logInfoMap)
Convenience method to set the log information map.- Parameters:
logInfoMap- Handler to the map which contains the log info
-
getLogInfoMap
public Map getLogInfoMap()
Returns the log information map which contains the set of fields and their corresponding values.- Specified by:
getLogInfoMapin interfaceILogRecord- Returns:
- The log information map.
-
getLogBy
public Object getLogBy()
Returns log by subject.- Specified by:
getLogByin interfaceILogRecord- Returns:
- log by subject.
-
getLogFor
public Object getLogFor()
Returns log for subject.- Specified by:
getLogForin interfaceILogRecord- Returns:
- log for subject.
-
-