From a1190e87539b0ef747e5113dcf70ed852d3c6d21 Mon Sep 17 00:00:00 2001 From: Stefan Begerad Date: Thu, 6 Jan 2022 15:08:38 -0500 Subject: [PATCH] feat: add example logs --- slf4j/src/main/java/de/swingbe/slf4j/Main.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/slf4j/src/main/java/de/swingbe/slf4j/Main.java b/slf4j/src/main/java/de/swingbe/slf4j/Main.java index 3954430..c135ea6 100644 --- a/slf4j/src/main/java/de/swingbe/slf4j/Main.java +++ b/slf4j/src/main/java/de/swingbe/slf4j/Main.java @@ -6,7 +6,7 @@ import org.slf4j.LoggerFactory; public class Main { public final static Logger LOG = LoggerFactory.getLogger(Main.class); - public static void main(String[] args) { + public static void main(String[] args) throws InterruptedException { System.out.println("Hello world!"); LOG.debug("Debug Message Logged !!!"); @@ -25,6 +25,14 @@ public class Main { } LOG.trace("Exiting application."); + for (int i = 0; i < 2000; i++) { + LOG.trace("TRACE: This is the " + i + ". time I say 'Hello World'."); + LOG.info("INFO: This is the " + i + ". time I say 'Hello World'."); + LOG.debug("DEBUG: This is the " + i + ". time I say 'Hello World'."); + LOG.warn("WARN: This is the " + i + ". time I say 'Hello World'."); + LOG.error("ERROR: This is the " + i + ". time I say 'Hello World'."); + Thread.sleep(20); + } return; } }