Class LogLevelExtension

java.lang.Object
org.apache.flink.util.LogLevelExtension
All Implemented Interfaces:
org.junit.jupiter.api.extension.AfterAllCallback, org.junit.jupiter.api.extension.BeforeAllCallback, org.junit.jupiter.api.extension.Extension

public class LogLevelExtension extends Object implements org.junit.jupiter.api.extension.BeforeAllCallback, org.junit.jupiter.api.extension.AfterAllCallback
A extension that sets the log level for specific class/package loggers for a test. Logging configuration will only be extended when logging is enabled at all (so root logger is not OFF).
  • Field Details

    • LOGGING_ENABLED

      public static final boolean LOGGING_ENABLED
  • Constructor Details

    • LogLevelExtension

      public LogLevelExtension()
  • Method Details

    • beforeAll

      public void beforeAll(org.junit.jupiter.api.extension.ExtensionContext context) throws Exception
      Specified by:
      beforeAll in interface org.junit.jupiter.api.extension.BeforeAllCallback
      Throws:
      Exception
    • afterAll

      public void afterAll(org.junit.jupiter.api.extension.ExtensionContext context) throws Exception
      Specified by:
      afterAll in interface org.junit.jupiter.api.extension.AfterAllCallback
      Throws:
      Exception
    • set

      public LogLevelExtension set(Class<?> clazz, org.slf4j.event.Level level)
    • set

      public LogLevelExtension set(Package logPackage, org.slf4j.event.Level level)
    • set

      public LogLevelExtension set(String classOrPackageName, org.slf4j.event.Level level)