Class LogRecord

  • All Implemented Interfaces:
    ILogRecord, Serializable

    public class LogRecord
    extends LogRecord
    implements ILogRecord
    Extension to the JDK1.4 LogRecord to include the logInfo HashMap and methods to store and retrieve data from this logInfo Map. The logInfo Map 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. For JDK1.4 LogRecord please refer to
     http://java.sun.com/j2se/1.4.1/docs/api/java/util/logging/LogRecord.html
     
    See Also:
    Serialized Form
    • Constructor Detail

      • LogRecord

        public LogRecord​(Level level,
                         String msg)
        Construct the LogRecord with the given Level and message values.
        Parameters:
        level - The log Level
        msg - The message string
      • LogRecord

        public LogRecord​(Level level,
                         String msg,
                         Object token)
        Construct the LogRecord with 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 the LogRecord.
      • LogRecord

        public LogRecord​(Level level,
                         String msg,
                         Hashtable properties)
        Constructor for auth logging
        Parameters:
        level - The log Level.
        msg - The message string.
        properties - The Hashtable containing the properties for the LogRecord.
    • 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:
        addLogInfo in interface ILogRecord
        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 the LogConstants.TIME for this LogRecord to 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:
        getLogInfoMap in interface ILogRecord
        Returns:
        The log information map.
      • getLogBy

        public Object getLogBy()
        Returns log by subject.
        Specified by:
        getLogBy in interface ILogRecord
        Returns:
        log by subject.
      • getLogFor

        public Object getLogFor()
        Returns log for subject.
        Specified by:
        getLogFor in interface ILogRecord
        Returns:
        log for subject.