Program 1: Log4j Basic Logging Example
This program demonstrates basic logging using Apache Log4j in Java. It uses Logger to generate INFO, WARN, and ERROR log messages and BasicConfigurator to configure Log4j with a simple default configuration.
- logger.info() → Displays informational messages.
- logger.warn() → Displays warning messages.
- logger.error() → Displays error messages.
- BasicConfigurator.configure() → Provides basic Log4j configuration.
The program finally prints “Program Completed.” to the console.
Architecture

Create the below files
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>log4j-basic</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Log4j Basic Example</name>
<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<!-- Apache Log4j 1.x (legacy - note: Log4j 1.x is end-of-life) -->
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.5.0</version>
<configuration>
<mainClass>Log4jBasicExample</mainClass>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.4.2</version>
<configuration>
<archive>
<manifest>
<mainClass>Log4jBasicExample</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.6.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>Log4jBasicExample</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
import org.apache.log4j.Logger;
import org.apache.log4j.BasicConfigurator;
public class Log4jBasicExample {
static Logger logger =
Logger.getLogger(Log4jBasicExample.class);
public static void main(String[] args) {
BasicConfigurator.configure();
logger.info("Application Started");
logger.warn("Warning Message");
logger.error("Error Message");
System.out.println("Program Completed.");
}
}
Click on the Log4jBasicExample and Run the Log4jBasicExample
Execution and Output:
"C:\Program Files\Java\jdk-17\bin\java.exe" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2025.3.1\lib\idea_rt.jar=52547" -Dfile.encoding=UTF-8 -classpath D:\Testing\logging\log4j-basic\target\classes;C:\Users\dudek\.m2\repository\log4j\log4j\1.2.17\log4j-1.2.17.jar Log4jBasicExample
0 [main] INFO Log4jBasicExample - Application Started
2 [main] WARN Log4jBasicExample - Warning Message
2 [main] ERROR Log4jBasicExample - Error Message
Program Completed.
Process finished with exit code 0Code language: JavaScript (javascript)
Program 2: Log4j File Appender Logging Example
This program demonstrates how to use Apache Log4j to write log messages into a file instead of displaying them only on the console. It uses FileAppender to create/write to an application.log file and SimpleLayout to define the basic format of the log messages.
- FileAppender → Writes log messages to a specified file.
- SimpleLayout → Provides a simple format for each log message.
- logger.addAppender() → Connects the file appender to the logger.
- logger.info() → Records an informational message.
- logger.warn() → Records a warning message.
- logger.error() → Records an error message.
After successful execution, the log messages are stored in application.log, and the program displays “Log messages written to application.log” on the console.
Architecture

Create the below files
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>log4j-file-appender</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Log4j file Appender Example</name>
<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<!-- Apache Log4j 1.x (legacy - note: Log4j 1.x is end-of-life) -->
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.5.0</version>
<configuration>
<mainClass>Log4jFileAppenderExample</mainClass>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.4.2</version>
<configuration>
<archive>
<manifest>
<mainClass>Log4jFileAppenderExample</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.6.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>Log4jFileAppenderExample</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>import org.apache.log4j.FileAppender;
import org.apache.log4j.Logger;
import org.apache.log4j.SimpleLayout;
public class Log4jFileAppenderExample {
static Logger logger =
Logger.getLogger(Log4jFileAppenderExample.class);
public static void main(String[] args) {
try {
FileAppender fileAppender =
new FileAppender(
new SimpleLayout(),
"application.log");
logger.addAppender(fileAppender);
logger.info("Application Started");
logger.warn("Low Memory Warning");
logger.error("Unexpected Error");
System.out.println("Log messages written to application.log");
} catch (Exception e) {
System.out.println(e);
}
}
}Click on Log4jFileAppenderExample and Run the Log4jFileAppenderExample
Execution and Output:
"C:\Program Files\Java\jdk-17\bin\java.exe" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2025.3.1\lib\idea_rt.jar=58070" -Dfile.encoding=UTF-8 -classpath "D:\Testing\logging\log4j-file appender\target\classes;C:\Users\dudek\.m2\repository\log4j\log4j\1.2.17\log4j-1.2.17.jar" Log4jFileAppenderExample
Log messages written to application.log
Process finished with exit code 0
application.log
INFO - Application Started
WARN - Low Memory Warning
ERROR - Unexpected ErrorCode language: JavaScript (javascript)
Program 3: Log4jPatternLayoutExample
This program demonstrates how to use Apache Log4j with PatternLayout to display log messages in a customized format on the console. It uses ConsoleAppender to send the log output to the console and PatternLayout to define the structure of each log message.
- PatternLayout → Defines the format of log messages.
- ConsoleAppender → Displays log messages on the console.
- logger.addAppender() → Attaches the console appender to the logger.
- logger.info() → Records an informational message.
- logger.warn() → Records a warning message.
- logger.error() → Records an error message.
The pattern %d %-5p %c – %m%n represents:
- %d → Date and time
- %p → Log level
- %c → Logger name
- %m → Log message
- %n → New line
Architecture

Create the below files
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>log4j-pattern</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Log4j Pattern Example</name>
<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<!-- Apache Log4j 1.x (legacy - note: Log4j 1.x is end-of-life) -->
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.5.0</version>
<configuration>
<mainClass>Log4jPatternLayoutExample</mainClass>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.4.2</version>
<configuration>
<archive>
<manifest>
<mainClass>Log4jPatternLayoutExample</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.6.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>Log4jPatternLayoutExample</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>import org.apache.log4j.ConsoleAppender;
import org.apache.log4j.Logger;
import org.apache.log4j.PatternLayout;
public class Log4jPatternLayoutExample {
static Logger logger =
Logger.getLogger(Log4jPatternLayoutExample.class);
public static void main(String[] args) {
PatternLayout layout =
new PatternLayout("%d %-5p %c - %m%n");
ConsoleAppender appender =
new ConsoleAppender(layout);
logger.addAppender(appender);
logger.info("Application Started");
logger.warn("Invalid Input");
logger.error("System Failure");
}
}Click on Log4jPatternLayoutExample and Run the Log4jPatternLayoutExample
Execution and Output:
"C:\Program Files\Java\jdk-17\bin\java.exe" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2025.3.1\lib\idea_rt.jar=65042" -Dfile.encoding=UTF-8 -classpath D:\Testing\logging\log4j-pattern\target\classes;C:\Users\dudek\.m2\repository\log4j\log4j\1.2.17\log4j-1.2.17.jar Log4jPatternLayoutExample
2026-09-13 17:50:37,865 INFO Log4jPatternLayoutExample - Application Started
2026-09-13 17:50:37,866 WARN Log4jPatternLayoutExample - Invalid Input
2026-09-13 17:50:37,866 ERROR Log4jPatternLayoutExample - System Failure
Process finished with exit code 0Code language: JavaScript (javascript)
Program 1: SLF4J Basic Logging Example
This program demonstrates basic logging using SLF4J (Simple Logging Facade for Java). It uses LoggerFactory to create a logger and logger.info() to record an informational message when the application starts.
- Logger → Provides logging methods such as info(), warn(), and error().
- LoggerFactory → Creates a logger instance for the specified class.
- logger.info() → Records an informational message.
- System.out.println() → Displays a normal message directly on the console.
The program logs “Application Started Successfully.” and then displays “Program Executed.” on the console.
Architecture

Create the below files
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>slf4j-basic</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>SLF4J Basic Example</name>
<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<!-- SLF4J API -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>2.0.16</version>
</dependency>
<!-- Logback as the SLF4J implementation (recommended) -->
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.5.12</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.5.0</version>
<configuration>
<mainClass>SLF4JBasicExample</mainClass>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.4.2</version>
<configuration>
<archive>
<manifest>
<mainClass>SLF4JBasicExample</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.6.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>SLF4JBasicExample</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class SLF4JBasicExample {
private static final Logger logger =
LoggerFactory.getLogger(SLF4JBasicExample.class);
public static void main(String[] args) {
logger.info("Application Started Successfully.");
System.out.println("Program Executed.");
}
}
Click on SLF4JBasicExample and Run the SLF4JBasicExample
Execution and Output:
"C:\Program Files\Java\jdk-17\bin\java.exe" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2025.3.1\lib\idea_rt.jar=52062" -Dfile.encoding=UTF-8 -classpath D:\Testing\logging\slf4j-basic\target\classes;C:\Users\dudek\.m2\repository\org\slf4j\slf4j-api\2.0.16\slf4j-api-2.0.16.jar;C:\Users\dudek\.m2\repository\ch\qos\logback\logback-classic\1.5.12\logback-classic-1.5.12.jar;C:\Users\dudek\.m2\repository\ch\qos\logback\logback-core\1.5.12\logback-core-1.5.12.jar SLF4JBasicExample
17:57:16.817 [main] INFO SLF4JBasicExample -- Application Started Successfully.
Program Executed.
Process finished with exit code 0Code language: JavaScript (javascript)
Program 5: SLF4J Exception Logging Example
This program demonstrates how to use SLF4J to log exceptions and error messages in a Java application. It performs a division operation that causes an ArithmeticException and uses logger.error() to record the error along with the exception details.
- Logger → Provides logging methods for different log levels.
- LoggerFactory → Creates the logger object for the class.
- try-catch → Handles the exception generated during division.
- logger.error() → Logs an error message along with the complete exception information.
- e → Passes the exception object so that the stack trace can also be recorded.
The program safely handles the division-by-zero exception instead of terminating abruptly and logs the exception details through SLF4J.
Architecture

Create the below files
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>slf4j-exception</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>SLF4J Exception Example</name>
<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<!-- SLF4J API -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>2.0.16</version>
</dependency>
<!-- Logback as the SLF4J implementation (recommended) -->
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.5.12</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.5.0</version>
<configuration>
<mainClass>SLF4JExceptionExample</mainClass>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.4.2</version>
<configuration>
<archive>
<manifest>
<mainClass>SLF4JExceptionExample</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.6.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>SLF4JExceptionExample</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class SLF4JExceptionExample {
private static final Logger logger =
LoggerFactory.getLogger(SLF4JExceptionExample.class);
public static void main(String[] args) {
try {
int result = 100 / 0;
System.out.println(result);
} catch (Exception e) {
logger.error("Exception occurred while performing division.", e);
}
}
}Click on LF4JExceptionExample and Run the SLF4JExceptionExample
Execution and Output:
"C:\Program Files\Java\jdk-17\bin\java.exe" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2025.3.1\lib\idea_rt.jar=51856" -Dfile.encoding=UTF-8 -classpath D:\Testing\logging\slf4j-exception\target\classes;C:\Users\dudek\.m2\repository\org\slf4j\slf4j-api\2.0.16\slf4j-api-2.0.16.jar;C:\Users\dudek\.m2\repository\ch\qos\logback\logback-classic\1.5.12\logback-classic-1.5.12.jar;C:\Users\dudek\.m2\repository\ch\qos\logback\logback-core\1.5.12\logback-core-1.5.12.jar SLF4JExceptionExample
18:03:17.580 [main] ERROR SLF4JExceptionExample -- Exception occurred while performing division.
java.lang.ArithmeticException: / by zero
at SLF4JExceptionExample.main(SLF4JExceptionExample.java:10)
Process finished with exit code 0Code language: PHP (php)
Program 6: SLF4J Logging Levels Example
This program demonstrates the use of different logging levels in SLF4J to record messages based on their importance. It uses a logger to generate DEBUG, INFO, WARN, and ERROR messages.
- logger.debug() → Records detailed debugging information.
- logger.info() → Records general application information.
- logger.warn() → Records warning messages about potential problems.
- logger.error() → Records error messages indicating a failure or serious problem.
The program helps demonstrate how different SLF4J logging levels can be used to categorize and manage application messages. Depending on the logging configuration, some levels may be displayed while others may be filtered out.
Architecture

Create the below files
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>slf4j-levels</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>SLF4J Levels Example</name>
<properties>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<!-- SLF4J API -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>2.0.16</version>
</dependency>
<!-- Logback as the SLF4J implementation (recommended) -->
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.5.12</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.5.0</version>
<configuration>
<mainClass>SLF4JLevelsExample</mainClass>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.4.2</version>
<configuration>
<archive>
<manifest>
<mainClass>SLF4JLevelsExample</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.6.0</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>SLF4JLevelsExample</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class SLF4JLevelsExample {
private static final Logger logger =
LoggerFactory.getLogger(SLF4JLevelsExample.class);
public static void main(String[] args) {
logger.debug("Debug Message");
logger.info("Information Message");
logger.warn("Warning Message");
logger.error("Error Message");
}
}
Click on SLF4JLevelsExample and Run the SLF4JLevelsExample
Execution and Output:
"C:\Program Files\Java\jdk-17\bin\java.exe" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2025.3.1\lib\idea_rt.jar=50061" -Dfile.encoding=UTF-8 -classpath D:\Testing\logging\slf4j-levels\target\classes;C:\Users\dudek\.m2\repository\org\slf4j\slf4j-api\2.0.16\slf4j-api-2.0.16.jar;C:\Users\dudek\.m2\repository\ch\qos\logback\logback-classic\1.5.12\logback-classic-1.5.12.jar;C:\Users\dudek\.m2\repository\ch\qos\logback\logback-core\1.5.12\logback-core-1.5.12.jar SLF4JLevelsExample
18:10:50.746 [main] DEBUG SLF4JLevelsExample -- Debug Message
18:10:50.753 [main] INFO SLF4JLevelsExample -- Information Message
18:10:50.753 [main] WARN SLF4JLevelsExample -- Warning Message
18:10:50.753 [main] ERROR SLF4JLevelsExample -- Error Message
Process finished with exit code 0Code language: JavaScript (javascript)
