Class CustomLogRecord

  • All Implemented Interfaces:
    java.io.Serializable

    public class CustomLogRecord
    extends java.util.logging.LogRecord
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      CustomLogRecord​(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()
      Get the name of the class that (allegedly) issued the logging request.
      java.lang.String getSourceMethodName()
      Get the name of the method that (allegedly) issued the logging request.
      • 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
    • Constructor Detail

      • CustomLogRecord

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

      • getSourceClassName

        public java.lang.String getSourceClassName()
        Get the name of the class that (allegedly) issued the logging request.

        Note that this sourceClassName is not verified and may be spoofed. This information may either have been provided as part of the logging call, or it may have been inferred automatically by the logging framework. In the latter case, the information may only be approximate and may in fact describe an earlier call on the stack frame.

        May be null if no information could be obtained.

        Overrides:
        getSourceClassName in class java.util.logging.LogRecord
        Returns:
        the source class name
      • getSourceMethodName

        public java.lang.String getSourceMethodName()
        Get the name of the method that (allegedly) issued the logging request.

        Note that this sourceMethodName is not verified and may be spoofed. This information may either have been provided as part of the logging call, or it may have been inferred automatically by the logging framework. In the latter case, the information may only be approximate and may in fact describe an earlier call on the stack frame.

        May be null if no information could be obtained.

        Overrides:
        getSourceMethodName in class java.util.logging.LogRecord
        Returns:
        the source method name