diff --git a/NGCC/resources/log4j2.properties b/NGCC/resources/log4j2.properties new file mode 100644 index 0000000..ac18c1e --- /dev/null +++ b/NGCC/resources/log4j2.properties @@ -0,0 +1,38 @@ +#status = error +#dest = err +#name = PropertiesConfig +# +#property.filename = target/rolling/rollingtest.log +# +#filter.threshold.type = ThresholdFilter +#filter.threshold.level = debug +# +#appender.console.type = Console +#appender.console.name = STDOUT +#appender.console.layout.type = PatternLayout +#appender.console.layout.pattern = %m%n +#appender.console.filter.threshold.type = ThresholdFilter +#appender.console.filter.threshold.level = error +# +#appender.rolling.type = RollingFile +#appender.rolling.name = RollingFile +#appender.rolling.fileName = ${filename} +#appender.rolling.filePattern = target/rolling2/test1-%d{MM-dd-yy-HH-mm-ss}-%i.log.gz +#appender.rolling.layout.type = PatternLayout +#appender.rolling.layout.pattern = %d %p %C{1.} [%t] %m%n +#appender.rolling.policies.type = Policies +#appender.rolling.policies.time.type = TimeBasedTriggeringPolicy +#appender.rolling.policies.time.interval = 2 +#appender.rolling.policies.time.modulate = true +#appender.rolling.policies.size.type = SizeBasedTriggeringPolicy +#appender.rolling.policies.size.size=100MB +#appender.rolling.strategy.type = DefaultRolloverStrategy +#appender.rolling.strategy.max = 5 +# +#logger.rolling.name = com.example.my.app +#logger.rolling.level = debug +#logger.rolling.additivity = false +#logger.rolling.appenderRef.rolling.ref = RollingFile +# +#rootLogger.level = info +#rootLogger.appenderRef.stdout.ref = STDOUT \ No newline at end of file diff --git a/NGCC/src/Exec.java b/NGCC/src/Exec.java index 64378e4..2ba7802 100644 --- a/NGCC/src/Exec.java +++ b/NGCC/src/Exec.java @@ -1,4 +1,4 @@ -import java.util.concurrent.Callable; + import java.util.concurrent.Callable; import commands.Analyse; import commands.Build; diff --git a/NGCC/src/commands/Read.java b/NGCC/src/commands/Read.java index 7f1943b..38d89c2 100644 --- a/NGCC/src/commands/Read.java +++ b/NGCC/src/commands/Read.java @@ -92,7 +92,6 @@ public class Read implements Callable { //*************************************************** - System.out.println("\nRead mode activated ...\n"); // Debug des paramètres à exploiter plus tard System.out.println("Update : "+step +"\n"+ "Verbose : "+vb_level +"\n"+ diff --git a/NGCC/tests/log4j/TestLog4j.java b/NGCC/tests/log4j/TestLog4j.java new file mode 100644 index 0000000..e803230 --- /dev/null +++ b/NGCC/tests/log4j/TestLog4j.java @@ -0,0 +1,23 @@ +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 { + + + private static Logger logger = LogManager.getLogger(); + + public static void main(String[] args) { + logger.debug("msg de debogage"); + logger.info("msg d'information"); + logger.warn("msg d'avertissement"); + logger.error("msg d'erreur"); + logger.fatal("msg d'erreur fatale"); + } + +}