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:
- 5.2
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description java.lang.String[]categoriesCategory names representing Log4j categories to change.java.lang.Class<?>[]classesClasses representing Log4j categories to change.java.lang.StringlevelThe Log4j level name to switch the categories to during the test.
-
Element Details
-
classes
java.lang.Class<?>[] classesClasses representing Log4j categories to change.- Returns:
- the classes.
- Default:
- {}
-
categories
java.lang.String[] categoriesCategory names representing Log4j categories to change.- Returns:
- the names.
- Default:
- {}
-
level
java.lang.String levelThe Log4j level name to switch the categories to during the test.- Returns:
- the level.
- Default:
- ""
-