2019-09-27 00:32:16 +02:00
|
|
|
package log4j;
|
|
|
|
|
|
|
|
import static org.junit.jupiter.api.Assertions.*;
|
|
|
|
|
|
|
|
|
|
|
|
import org.apache.logging.log4j.LogManager;
|
|
|
|
import org.apache.logging.log4j.Logger;
|
|
|
|
import org.junit.jupiter.api.Test;
|
|
|
|
|
|
|
|
class TestLog4j {
|
|
|
|
|
|
|
|
|
2019-10-03 15:08:36 +02:00
|
|
|
private static Logger logger = LogManager.getLogger(LogManager.getLogger("ngccLog"));
|
2019-09-27 00:32:16 +02:00
|
|
|
|
|
|
|
public static void main(String[] args) {
|
2019-09-27 10:35:38 +02:00
|
|
|
|
2019-09-27 00:32:16 +02:00
|
|
|
logger.debug("msg de debogage");
|
|
|
|
logger.info("msg d'information");
|
|
|
|
logger.warn("msg d'avertissement");
|
|
|
|
logger.error("msg d'erreur");
|
2019-09-27 10:35:38 +02:00
|
|
|
logger.fatal("msg d'erreur fatale");
|
|
|
|
|
2019-09-27 00:32:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|