Class MethodLogConfiguration

java.lang.Object
com.foreach.across.modules.logging.method.MethodLogConfiguration

@ConfigurationProperties("logging.method") public class MethodLogConfiguration extends Object
Author:
Arne Vandamme
  • Field Details

  • Constructor Details

    • MethodLogConfiguration

      public MethodLogConfiguration()
  • Method Details

    • isEnabled

      public boolean isEnabled()
      Returns:
      true if method logging in general is enabled
    • setEnabled

      public void setEnabled(boolean enabled)
    • getDefaultMinimumDuration

      public int getDefaultMinimumDuration()
    • setDefaultMinimumDuration

      public void setDefaultMinimumDuration(int defaultMinimumDuration)
    • setEnabled

      public void setEnabled(String loggerName, boolean enabled)
      Set enabled status for a specific logger. Only if the global isEnabled() is true can any logger be enabled. If you want the default status for unspecified loggers to be set, use the WILDCARD token as logger name.
      Parameters:
      loggerName - of the specific logger
      enabled - true if logging is active
    • setMinimumDuration

      public void setMinimumDuration(String loggerName, int minimumDuration)
    • isEnabled

      public boolean isEnabled(String loggerName)
    • getMinimumDuration

      public int getMinimumDuration(String loggerName)
    • register

      public void register(MethodLogger methodLogger)
    • all

      public static MethodLogConfiguration all(int minimumDuration)
      Creates a default method log configuration that enables method logging for all loggers, with the set minimum duration.
      Parameters:
      minimumDuration - for the method logging
      Returns:
      modifiable configuration