INT-4407: Add merge option to Log4j2LevelAdjuster

JIRA: https://jira.spring.io/browse/INT-4407

To make a `Log4j2LevelAdjuster` more builder friendly, add a `merge`
option to the overloaded `classes()` and `categories()` methods.
This way the existing (or previously configured) `categories` and
`classes` are merged with the provided values and default
`org.springframework.integration` category can be reuse.

Note: this behavior can be reconsidered as default one in the `5.1`
This commit is contained in:
Artem Bilan
2018-02-20 14:58:52 -05:00
committed by Gary Russell
parent 4bb4a0187a
commit e46fc9b738
6 changed files with 40 additions and 12 deletions

View File

@@ -60,8 +60,7 @@ public class DelayerHandlerRescheduleIntegrationTests extends RedisAvailableTest
@Rule
public Log4j2LevelAdjuster adjuster =
Log4j2LevelAdjuster.trace()
.categories("org.springframework.integration",
"org.springframework.data.redis");
.categories(true, "org.springframework.data.redis");
@Test
@RedisAvailable