Class BambooLog4j2Utils


  • public final class BambooLog4j2Utils
    extends Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static org.apache.logging.log4j.Level getLogLevel​(com.google.common.base.Stopwatch stopWatch, int infoThresholdSeconds, int warnThresholdSeconds, int errorThresholdSeconds)
      Returns the log level according to the supplied info/warn/error thresholds.
      static org.apache.logging.log4j.Level getLogLevel​(com.google.common.base.Stopwatch stopWatch, Duration infoThreshold, Duration warnThreshold, Duration errorThreshold)
      Returns the log level according to the supplied info/warn/error thresholds.
      static void logOperationTime​(org.apache.logging.log4j.Logger log, com.google.common.base.Stopwatch stopWatch, int infoThresholdSeconds, int warnThresholdSeconds, int errorThresholdSeconds, String operation)  
      static void logOperationTime​(org.apache.logging.log4j.Logger log, com.google.common.base.Stopwatch stopWatch, Duration infoThreshold, Duration warnThreshold, Duration errorThreshold, String operation)  
    • Method Detail

      • getLogLevel

        public static org.apache.logging.log4j.Level getLogLevel​(com.google.common.base.Stopwatch stopWatch,
                                                                 int infoThresholdSeconds,
                                                                 int warnThresholdSeconds,
                                                                 int errorThresholdSeconds)
        Returns the log level according to the supplied info/warn/error thresholds.
      • getLogLevel

        public static org.apache.logging.log4j.Level getLogLevel​(com.google.common.base.Stopwatch stopWatch,
                                                                 Duration infoThreshold,
                                                                 Duration warnThreshold,
                                                                 Duration errorThreshold)
        Returns the log level according to the supplied info/warn/error thresholds.
      • logOperationTime

        public static void logOperationTime​(org.apache.logging.log4j.Logger log,
                                            com.google.common.base.Stopwatch stopWatch,
                                            int infoThresholdSeconds,
                                            int warnThresholdSeconds,
                                            int errorThresholdSeconds,
                                            String operation)
      • logOperationTime

        public static void logOperationTime​(org.apache.logging.log4j.Logger log,
                                            com.google.common.base.Stopwatch stopWatch,
                                            Duration infoThreshold,
                                            Duration warnThreshold,
                                            Duration errorThreshold,
                                            String operation)