Package 

Class ContextLogRecord

  • All Implemented Interfaces:
    java.io.Serializable

    
    public class ContextLogRecord
    extends LogRecord
                        

    ContextLogRecord extends LogRecord and adds a 'context' String. The reason it's done this way and the context is not added to the log message itself is so that, in the log formatter, we can place this context elsewhere (notably before the class and method names) in the final log message.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected final String context
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      String getContext()
      • 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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait