Class ExecutorTrace


  • public class ExecutorTrace
    extends Object
    Utility class used to trace executor processors, subscribers, and tasks.
    Since:
    21.12
    Author:
    lh
    • Field Detail

      • LOGLEVEL

        public static final int LOGLEVEL
        Log level for ExecutorTrace messages
        See Also:
        Constant Field Values
    • Constructor Detail

      • ExecutorTrace

        public ExecutorTrace()
    • Method Detail

      • isEnabled

        public static boolean isEnabled()
        Return true if executor trace logging is enabled; false otherwise.
        Returns:
        true if executor trace logging is enabled
      • log

        public static void log​(String message)
        Log the specified message at the Debugging severity level. Default severity level is Logger.FINEST.
        Parameters:
        message - the message to log
      • log

        public static void log​(String message,
                               Debugging debugging)
        Log the specified message with the given debugging option.
        Parameters:
        message - the message to log
        debugging - the debugging option
      • log

        public static void log​(Supplier<String> supplierMessage)
        Log the specified message at the Debugging severity level. Default severity level is Logger.FINEST.

        The message is provided by the Supplier, which will only be evaluated if the messages should be logged at the specified severity level. This avoids potentially expensive message construction if the message isn't going to be logged.

        Parameters:
        supplierMessage - the supplier of the message to log; only evaluated if the Debugging severity level should be logged
      • log

        public static void log​(Supplier<String> supplierMessage,
                               Debugging debugging)
        Log the specified message with the given debugging option.

        The message is provided by the Supplier, which will only be evaluated if the messages should be logged at the specified severity level. This avoids potentially expensive message construction if the message isn't going to be logged.

        Parameters:
        supplierMessage - the supplier of the message to log; only evaluated if the specified severity level should be logged
        debugging - the debugging option
      • entering

        public static void entering​(Class<?> clz,
                                    String sMethod,
                                    Object... params)
        Entry logging.
        Parameters:
        clz - the source Class
        sMethod - the source method
        params - zero or more parameters to log
        Throws:
        NullPointerException - if either clz or sMethod are null
      • entering

        public static void entering​(Class<?> clz,
                                    String sMethod,
                                    Supplier<Object> params)
        Entry logging.
        Parameters:
        clz - the source Class
        sMethod - the source method
        params - zero or more parameters to log
        Throws:
        NullPointerException - if either clz or sMethod are null
        Since:
        22.06
      • exiting

        public static void exiting​(Class<?> clz,
                                   String sMethod)
        Exit logging.
        Parameters:
        clz - the source Class
        sMethod - the source method
        Throws:
        NullPointerException - if either clz or sMethod are null
      • exiting

        public static void exiting​(Class<?> clz,
                                   String sMethod,
                                   Object result,
                                   Object... additionalInfo)
        Exit logging.
        Parameters:
        clz - the source Class
        sMethod - the source method
        result - the result returned by the exiting method
        additionalInfo - zero or more additional state details at the time of exit
        Throws:
        NullPointerException - if either clz or sMethod are null
      • exiting

        public static void exiting​(Class<?> clz,
                                   String sMethod,
                                   Object result,
                                   Supplier<Object> params)
        Exit logging.
        Parameters:
        clz - the source Class
        sMethod - the source method
        result - the result returned by the exiting method
        params - zero or more additional state details at the time of exit
        Throws:
        NullPointerException - if either clz or sMethod are null
        Since:
        22.06
      • throwing

        public static void throwing​(Class<?> clz,
                                    String sMethod,
                                    Throwable throwable,
                                    Object... additionalInfo)
        Throwable logging.
        Parameters:
        clz - the source Class
        sMethod - the source method
        throwable - the Exception being thrown
        additionalInfo - zero or more additional state details at the time of exit
        Throws:
        NullPointerException - if any arguments are null