From e3b3dff24410233df7af8d9eca0ec7327efe3334 Mon Sep 17 00:00:00 2001 From: Daniele Demichelis Date: Sat, 24 Dec 2016 04:59:29 +0100 Subject: [PATCH] Pull Request for fix to "A Guide to Rolling File Appenders" article. (#919) * First test with log4j rolling appenders * small fix * Log4j rolling appender * First set up with rolling file on log4j 2 * Added logback code. * log4j2 more detailed example * log4j2 more detailed example * Improved names and examples * Fixed configurations * improved configs * formatted * Final fix * fixed formatting * Formatting fix * Fix sample apps to avoid try / catch * Fix request to replace files * Fix end lines * Log4j2 logger is shot down at the end. --- .../main/java/com/baeldung/log4j2/Log4j2RollingExample.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/log4j/src/main/java/com/baeldung/log4j2/Log4j2RollingExample.java b/log4j/src/main/java/com/baeldung/log4j2/Log4j2RollingExample.java index 8e0b9fccab..0adf7ed2bf 100644 --- a/log4j/src/main/java/com/baeldung/log4j2/Log4j2RollingExample.java +++ b/log4j/src/main/java/com/baeldung/log4j2/Log4j2RollingExample.java @@ -1,7 +1,5 @@ package com.baeldung.log4j2; -import java.util.stream.IntStream; - import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -14,6 +12,7 @@ public class Log4j2RollingExample { logger.info("This is the {} time I say 'Hello World'.", i); Thread.sleep(100); } + LogManager.shutdown(); } }