Annotation Type LogLevels
-
@ExtendWith(LogLevelsCondition.class) @Target({TYPE,METHOD}) @Retention(RUNTIME) @Documented public @interface LogLevels
Test classes annotated with this will change logging levels between tests. It can also be applied to individual test methods. If both class-level and method-level annotations are present, the method-level annotation is used.- Since:
- 2.2
- Author:
- Gary Russell
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description String[]
categories
Category names representing Log4j or Logback categories to change.Class<?>[]
classes
Classes representing Log4j categories to change.String
level
The Log4j level name to switch the categories to during the test.
-
-
-
Element Detail
-
classes
Class<?>[] classes
Classes representing Log4j categories to change.- Returns:
- the classes.
- Default:
- {}
-
-
-
categories
String[] categories
Category names representing Log4j or Logback categories to change.- Returns:
- the names.
- Default:
- {}
-
-
-
level
String level
The Log4j level name to switch the categories to during the test.- Returns:
- the level (default Log4j
Levels.toLevel()
- currently, DEBUG).
- Default:
- ""
-
-