Class LazyLog4jLogRecord

  • All Implemented Interfaces:
    java.io.Serializable

    final class LazyLog4jLogRecord
    extends java.util.logging.LogRecord
    Extension of LogRecord with lazy get source related methods based on Log4j's StackLocatorUtil.calcLocation(String).
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.String fqcn  
      private boolean inferCaller  
      private static long serialVersionUID  
    • Constructor Summary

      Constructors 
      Constructor Description
      LazyLog4jLogRecord​(java.lang.String fqcn, java.util.logging.Level level, java.lang.String msg)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getSourceClassName()  
      java.lang.String getSourceMethodName()  
      private void inferCaller()  
      • Methods inherited from class java.util.logging.LogRecord

        getInstant, getLevel, getLoggerName, getMessage, getMillis, getParameters, getResourceBundle, getResourceBundleName, getSequenceNumber, 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
    • Field Detail

      • inferCaller

        private transient boolean inferCaller
      • fqcn

        private final java.lang.String fqcn
    • Constructor Detail

      • LazyLog4jLogRecord

        LazyLog4jLogRecord​(java.lang.String fqcn,
                           java.util.logging.Level level,
                           java.lang.String msg)
    • Method Detail

      • getSourceClassName

        public java.lang.String getSourceClassName()
        Overrides:
        getSourceClassName in class java.util.logging.LogRecord
      • getSourceMethodName

        public java.lang.String getSourceMethodName()
        Overrides:
        getSourceMethodName in class java.util.logging.LogRecord
      • inferCaller

        private void inferCaller()