Merge branch 'pr-3789' into pmd7-896-slf4j
This commit is contained in:
2 files changed
+3
-3
No files matched your search
@@ -561,7 +561,7 @@ public final class PMD {
|
||||
Slf4jSimpleConfiguration.reconfigureDefaultLogLevel(logLevel);
|
||||
// need to reload the logger with the new configuration
|
||||
log = LoggerFactory.getLogger(PMD.class);
|
||||
log.atLevel(logLevel).log("Loglevel is at {}", logLevel);
|
||||
log.atLevel(logLevel).log("Log level is at {}", logLevel);
|
||||
|
||||
StatusCode status;
|
||||
try {
|
||||
|
||||
@@ -171,13 +171,13 @@ public class CoreCliTest {
|
||||
@Test
|
||||
public void debugLogging() {
|
||||
runPmdSuccessfully("--debug", "--no-cache", "--dir", srcDir, "--rulesets", DUMMY_RULESET);
|
||||
errStreamCaptor.getLog().contains("[main] DEBUG net.sourceforge.pmd.PMD - Loglevel is at DEBUG");
|
||||
errStreamCaptor.getLog().contains("[main] DEBUG net.sourceforge.pmd.PMD - Log level is at DEBUG");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void defaultLogging() {
|
||||
runPmdSuccessfully("--no-cache", "--dir", srcDir, "--rulesets", DUMMY_RULESET);
|
||||
errStreamCaptor.getLog().contains("[main] INFO net.sourceforge.pmd.PMD - Loglevel is at INFO");
|
||||
errStreamCaptor.getLog().contains("[main] INFO net.sourceforge.pmd.PMD - Log level is at INFO");
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user