Bael-3960, asserting log messages with junit code.
This commit is contained in:
marc06210
2020-05-04 18:03:21 +02:00
committed by GitHub
parent 93074cdabc
commit b3f1413445
7 changed files with 173 additions and 0 deletions
@@ -0,0 +1,16 @@
package com.baeldung.junit.log;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class BusinessWorker {
private static Logger LOGGER = LoggerFactory.getLogger(BusinessWorker.class);
public void generateLogs(String msg) {
LOGGER.trace(msg);
LOGGER.debug(msg);
LOGGER.info(msg);
LOGGER.warn(msg);
LOGGER.error(msg);
}
}