Package 

Interface LoggingPolicy


  • 
    public interface LoggingPolicy
    
                        

    Defines the internal logging behavior of this library.

    • Method Summary

      Modifier and Type Method Description
      static LoggingPolicy getDefault() Provides the default logging policy which will log all the LogLevels on debuggable applicationsand only logs from level INFO and above for non-debuggable applications.
      static LoggingPolicy enabled(LogLevel minimumLevel) Convenience method for creating an enabled logging policy with a static minimum level.
      static LoggingPolicy disabled() Convenience method for creating a policy that disables all internal logs.
      abstract boolean isEnabled() Whether logging in general is enabled or not.
      abstract LogLevel getMinimumLevel() If logging is enabled, this value will be checked later to filter which logs willget printed.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getDefault

         static LoggingPolicy getDefault()

        Provides the default logging policy which will log all the LogLevels on debuggable applicationsand only logs from level INFO and above for non-debuggable applications.

        No logs will be created until the Agent is initialized.

      • enabled

         static LoggingPolicy enabled(LogLevel minimumLevel)

        Convenience method for creating an enabled logging policy with a static minimum level.

        Parameters:
        minimumLevel - - The minimum LogLevel, all the logs with this level and above will get printed, others will be ignored.
      • disabled

         static LoggingPolicy disabled()

        Convenience method for creating a policy that disables all internal logs.

      • isEnabled

         abstract boolean isEnabled()

        Whether logging in general is enabled or not. This value will be checked before the log level.

      • getMinimumLevel

         abstract LogLevel getMinimumLevel()

        If logging is enabled, this value will be checked later to filter which logs willget printed. Logs with at least the level provided here or higher will pass, other ones (below the level provided here) will be ignored.