Class PreserveLogLevelRule
java.lang.Object
com.atlassian.bamboo.testutils.junit.rule.PreserveLogLevelRule
- All Implemented Interfaces:
org.junit.rules.TestRule
Rule that allows modifying Log4j's log level during test and restores original level afterwards.
Useful in wired tests.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.junit.runners.model.Statement
apply
(org.junit.runners.model.Statement base, org.junit.runner.Description description) void
changeLevel
(Class clazz, org.apache.log4j.Level level) void
changeLevel
(String className, org.apache.log4j.Level level)
-
Constructor Details
-
PreserveLogLevelRule
public PreserveLogLevelRule()
-
-
Method Details
-
apply
public org.junit.runners.model.Statement apply(org.junit.runners.model.Statement base, org.junit.runner.Description description) - Specified by:
apply
in interfaceorg.junit.rules.TestRule
-
changeLevel
-
changeLevel
-