Class Log4j2LevelAdjuster
- java.lang.Object
-
- org.springframework.kafka.test.rule.Log4j2LevelAdjuster
-
- All Implemented Interfaces:
org.junit.rules.MethodRule
public class Log4j2LevelAdjuster extends java.lang.Object implements org.junit.rules.MethodRule
A JUnit method @Rule that changes the logger level for a set of classes while a test method is running. Useful for performance or scalability tests where we don't want to generate a large log in a tight inner loop.- Author:
- Dave Syer, Artem Bilan, Gary Russell
-
-
Constructor Summary
Constructors Constructor Description Log4j2LevelAdjuster(org.apache.logging.log4j.Level level, java.lang.Class<?>... classes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.junit.runners.model.Statement
apply(org.junit.runners.model.Statement base, org.junit.runners.model.FrameworkMethod method, java.lang.Object target)
Log4j2LevelAdjuster
categories(java.lang.String... categoriesToAdjust)
-
-
-
Method Detail
-
categories
public Log4j2LevelAdjuster categories(java.lang.String... categoriesToAdjust)
-
apply
public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base, org.junit.runners.model.FrameworkMethod method, java.lang.Object target)
- Specified by:
apply
in interfaceorg.junit.rules.MethodRule
-
-