Class LogLevelAdjuster
java.lang.Object
org.springframework.amqp.rabbit.junit.LogLevelAdjuster
- All Implemented Interfaces:
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.
As well as adjusting Log4j, this also adjusts loggers for logback. The amqp-client
library now uses slf4j. Since we have logback on the CP (for the appender)
we can't add the slf4j-log4j bridge as well.
- Author:
- Dave Syer, Artem Bilan, Gary Russell
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.junit.runners.model.Statement
apply
(org.junit.runners.model.Statement base, org.junit.runners.model.FrameworkMethod method, Object target) categories
(String... categoriesToAdjust)
-
Constructor Details
-
LogLevelAdjuster
-
-
Method Details
-
categories
-
apply
public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base, org.junit.runners.model.FrameworkMethod method, Object target) - Specified by:
apply
in interfaceorg.junit.rules.MethodRule
-