aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDecebal Suiu <decebal.suiu@gmail.com>2023-03-05 14:52:59 +0200
committerGitHub <noreply@github.com>2023-03-05 14:52:59 +0200
commit2eb8d7809bc1ce8eb3ec175e02d71cd9e05206a5 (patch)
tree2231276f2019b8e3806ac0ac0e3312d480693241
parent6170d1973cc724f5c3a09bdb2543f82215a9a9d7 (diff)
downloadpf4j-2eb8d7809bc1ce8eb3ec175e02d71cd9e05206a5.tar.gz
pf4j-2eb8d7809bc1ce8eb3ec175e02d71cd9e05206a5.zip
Switch to slf4j-2.x and replace log4j with slf4j-simple (#514)
-rw-r--r--demo/app/pom.xml16
-rw-r--r--demo/app/src/main/resources/log4j2.properties27
-rwxr-xr-xdemo/app/src/main/resources/simplelogger.properties39
-rw-r--r--maven-archetypes/quickstart/src/main/resources/archetype-resources/app/pom.xml16
-rwxr-xr-xmaven-archetypes/quickstart/src/main/resources/archetype-resources/app/src/main/resources/log4j2.properties27
-rwxr-xr-xmaven-archetypes/quickstart/src/main/resources/archetype-resources/app/src/main/resources/simplelogger.properties39
-rwxr-xr-xmaven-archetypes/quickstart/src/main/resources/archetype-resources/pom.xml3
-rw-r--r--pf4j/pom.xml18
-rw-r--r--pf4j/src/test/resources/log4j2.properties27
-rwxr-xr-xpf4j/src/test/resources/simplelogger.properties39
-rw-r--r--pom.xml3
11 files changed, 128 insertions, 126 deletions
diff --git a/demo/app/pom.xml b/demo/app/pom.xml
index 4315d47..a837e78 100644
--- a/demo/app/pom.xml
+++ b/demo/app/pom.xml
@@ -77,19 +77,9 @@
<!-- Logging -->
<dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-api</artifactId>
- <version>${log4j.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-core</artifactId>
- <version>${log4j.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-slf4j-impl</artifactId>
- <version>${log4j.version}</version>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-simple</artifactId>
+ <version>${slf4j.version}</version>
</dependency>
<dependency>
diff --git a/demo/app/src/main/resources/log4j2.properties b/demo/app/src/main/resources/log4j2.properties
deleted file mode 100644
index 958b8d2..0000000
--- a/demo/app/src/main/resources/log4j2.properties
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-# Appenders
-#
-appender.console.type = Console
-appender.console.name = console
-appender.console.layout.type = PatternLayout
-#appender.console.layout.pattern = %-5p - %-32.32c{1} - %m\n
-appender.console.layout.pattern = %d %p %c - %m%n
-
-#
-# Loggers
-#
-
-# PF4J log
-logger.pf4j.name = org.pf4j
-logger.pf4j.level = debug
-logger.pf4j.additivity = false
-logger.pf4j.appenderRef.console.ref = console
-
-# !!! Uncomment below loggers when you are in trouble
-#logger.loader.name = org.pf4j.PluginClassLoader
-#logger.loader.level = trace
-#logger.finder.name = org.pf4j.AbstractExtensionFinder
-#logger.finder.level = trace
-
-rootLogger.level = debug
-rootLogger.appenderRef.console.ref = console
diff --git a/demo/app/src/main/resources/simplelogger.properties b/demo/app/src/main/resources/simplelogger.properties
new file mode 100755
index 0000000..40302dd
--- /dev/null
+++ b/demo/app/src/main/resources/simplelogger.properties
@@ -0,0 +1,39 @@
+# SLF4J's SimpleLogger configuration file
+# Simple implementation of Logger that sends all enabled log messages, for all defined loggers, to System.err.
+
+# Default logging detail level for all instances of SimpleLogger.
+# Must be one of ("trace", "debug", "info", "warn", or "error").
+# If not specified, defaults to "info".
+org.slf4j.simpleLogger.defaultLogLevel=debug
+
+# Logging detail level for a SimpleLogger instance named "xxxxx".
+# Must be one of ("trace", "debug", "info", "warn", or "error").
+# If not specified, the default logging detail level is used.
+#org.slf4j.simpleLogger.log.xxxxx=
+# !!! Uncomment below loggers when you are in trouble
+#org.slf4j.simpleLogger.log.org.pf4j.PluginClassLoader=trace
+#org.slf4j.simpleLogger.log.org.pf4j.AbstractExtensionFinder=trace
+
+# Set to true if you want the current date and time to be included in output messages.
+# Default is false, and will output the number of milliseconds elapsed since startup.
+#org.slf4j.simpleLogger.showDateTime=false
+org.slf4j.simpleLogger.showDateTime=true
+
+# The date and time format to be used in the output messages.
+# The pattern describing the date and time format is the same that is used in java.text.SimpleDateFormat.
+# If the format is not specified or is invalid, the default format is used.
+# The default format is yyyy-MM-dd HH:mm:ss:SSS Z.
+#org.slf4j.simpleLogger.dateTimeFormat=yyyy-MM-dd HH:mm:ss:SSS Z
+org.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss
+
+# Set to true if you want to output the current thread name.
+# Defaults to true.
+#org.slf4j.simpleLogger.showThreadName=true
+
+# Set to true if you want the Logger instance name to be included in output messages.
+# Defaults to true.
+#org.slf4j.simpleLogger.showLogName=true
+
+# Set to true if you want the last component of the name to be included in output messages.
+# Defaults to false.
+#org.slf4j.simpleLogger.showShortLogName=false
diff --git a/maven-archetypes/quickstart/src/main/resources/archetype-resources/app/pom.xml b/maven-archetypes/quickstart/src/main/resources/archetype-resources/app/pom.xml
index f4bf2ff..15facd8 100644
--- a/maven-archetypes/quickstart/src/main/resources/archetype-resources/app/pom.xml
+++ b/maven-archetypes/quickstart/src/main/resources/archetype-resources/app/pom.xml
@@ -65,19 +65,9 @@
<!-- Logging -->
<dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-api</artifactId>
- <version>${log4j.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-core</artifactId>
- <version>${log4j.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-slf4j-impl</artifactId>
- <version>${log4j.version}</version>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-simple</artifactId>
+ <version>${slf4j.version}</version>
</dependency>
<dependency>
diff --git a/maven-archetypes/quickstart/src/main/resources/archetype-resources/app/src/main/resources/log4j2.properties b/maven-archetypes/quickstart/src/main/resources/archetype-resources/app/src/main/resources/log4j2.properties
deleted file mode 100755
index 958b8d2..0000000
--- a/maven-archetypes/quickstart/src/main/resources/archetype-resources/app/src/main/resources/log4j2.properties
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-# Appenders
-#
-appender.console.type = Console
-appender.console.name = console
-appender.console.layout.type = PatternLayout
-#appender.console.layout.pattern = %-5p - %-32.32c{1} - %m\n
-appender.console.layout.pattern = %d %p %c - %m%n
-
-#
-# Loggers
-#
-
-# PF4J log
-logger.pf4j.name = org.pf4j
-logger.pf4j.level = debug
-logger.pf4j.additivity = false
-logger.pf4j.appenderRef.console.ref = console
-
-# !!! Uncomment below loggers when you are in trouble
-#logger.loader.name = org.pf4j.PluginClassLoader
-#logger.loader.level = trace
-#logger.finder.name = org.pf4j.AbstractExtensionFinder
-#logger.finder.level = trace
-
-rootLogger.level = debug
-rootLogger.appenderRef.console.ref = console
diff --git a/maven-archetypes/quickstart/src/main/resources/archetype-resources/app/src/main/resources/simplelogger.properties b/maven-archetypes/quickstart/src/main/resources/archetype-resources/app/src/main/resources/simplelogger.properties
new file mode 100755
index 0000000..40302dd
--- /dev/null
+++ b/maven-archetypes/quickstart/src/main/resources/archetype-resources/app/src/main/resources/simplelogger.properties
@@ -0,0 +1,39 @@
+# SLF4J's SimpleLogger configuration file
+# Simple implementation of Logger that sends all enabled log messages, for all defined loggers, to System.err.
+
+# Default logging detail level for all instances of SimpleLogger.
+# Must be one of ("trace", "debug", "info", "warn", or "error").
+# If not specified, defaults to "info".
+org.slf4j.simpleLogger.defaultLogLevel=debug
+
+# Logging detail level for a SimpleLogger instance named "xxxxx".
+# Must be one of ("trace", "debug", "info", "warn", or "error").
+# If not specified, the default logging detail level is used.
+#org.slf4j.simpleLogger.log.xxxxx=
+# !!! Uncomment below loggers when you are in trouble
+#org.slf4j.simpleLogger.log.org.pf4j.PluginClassLoader=trace
+#org.slf4j.simpleLogger.log.org.pf4j.AbstractExtensionFinder=trace
+
+# Set to true if you want the current date and time to be included in output messages.
+# Default is false, and will output the number of milliseconds elapsed since startup.
+#org.slf4j.simpleLogger.showDateTime=false
+org.slf4j.simpleLogger.showDateTime=true
+
+# The date and time format to be used in the output messages.
+# The pattern describing the date and time format is the same that is used in java.text.SimpleDateFormat.
+# If the format is not specified or is invalid, the default format is used.
+# The default format is yyyy-MM-dd HH:mm:ss:SSS Z.
+#org.slf4j.simpleLogger.dateTimeFormat=yyyy-MM-dd HH:mm:ss:SSS Z
+org.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss
+
+# Set to true if you want to output the current thread name.
+# Defaults to true.
+#org.slf4j.simpleLogger.showThreadName=true
+
+# Set to true if you want the Logger instance name to be included in output messages.
+# Defaults to true.
+#org.slf4j.simpleLogger.showLogName=true
+
+# Set to true if you want the last component of the name to be included in output messages.
+# Defaults to false.
+#org.slf4j.simpleLogger.showShortLogName=false
diff --git a/maven-archetypes/quickstart/src/main/resources/archetype-resources/pom.xml b/maven-archetypes/quickstart/src/main/resources/archetype-resources/pom.xml
index 5780239..4e97de1 100755
--- a/maven-archetypes/quickstart/src/main/resources/archetype-resources/pom.xml
+++ b/maven-archetypes/quickstart/src/main/resources/archetype-resources/pom.xml
@@ -26,8 +26,7 @@
<maven.compiler.release>8</maven.compiler.release>
<pf4j.version>{{project.version}}</pf4j.version>
- <slf4j.version>1.7.25</slf4j.version>
- <log4j.version>2.17.1</log4j.version>
+ <slf4j.version>2.0.6</slf4j.version>
</properties>
<build>
diff --git a/pf4j/pom.xml b/pf4j/pom.xml
index 28fb95c..24d171f 100644
--- a/pf4j/pom.xml
+++ b/pf4j/pom.xml
@@ -118,21 +118,9 @@
<!-- Logging -->
<dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-api</artifactId>
- <version>${log4j.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-core</artifactId>
- <version>${log4j.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-slf4j-impl</artifactId>
- <version>${log4j.version}</version>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-simple</artifactId>
+ <version>${slf4j.version}</version>
<scope>test</scope>
</dependency>
diff --git a/pf4j/src/test/resources/log4j2.properties b/pf4j/src/test/resources/log4j2.properties
deleted file mode 100644
index 958b8d2..0000000
--- a/pf4j/src/test/resources/log4j2.properties
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-# Appenders
-#
-appender.console.type = Console
-appender.console.name = console
-appender.console.layout.type = PatternLayout
-#appender.console.layout.pattern = %-5p - %-32.32c{1} - %m\n
-appender.console.layout.pattern = %d %p %c - %m%n
-
-#
-# Loggers
-#
-
-# PF4J log
-logger.pf4j.name = org.pf4j
-logger.pf4j.level = debug
-logger.pf4j.additivity = false
-logger.pf4j.appenderRef.console.ref = console
-
-# !!! Uncomment below loggers when you are in trouble
-#logger.loader.name = org.pf4j.PluginClassLoader
-#logger.loader.level = trace
-#logger.finder.name = org.pf4j.AbstractExtensionFinder
-#logger.finder.level = trace
-
-rootLogger.level = debug
-rootLogger.appenderRef.console.ref = console
diff --git a/pf4j/src/test/resources/simplelogger.properties b/pf4j/src/test/resources/simplelogger.properties
new file mode 100755
index 0000000..40302dd
--- /dev/null
+++ b/pf4j/src/test/resources/simplelogger.properties
@@ -0,0 +1,39 @@
+# SLF4J's SimpleLogger configuration file
+# Simple implementation of Logger that sends all enabled log messages, for all defined loggers, to System.err.
+
+# Default logging detail level for all instances of SimpleLogger.
+# Must be one of ("trace", "debug", "info", "warn", or "error").
+# If not specified, defaults to "info".
+org.slf4j.simpleLogger.defaultLogLevel=debug
+
+# Logging detail level for a SimpleLogger instance named "xxxxx".
+# Must be one of ("trace", "debug", "info", "warn", or "error").
+# If not specified, the default logging detail level is used.
+#org.slf4j.simpleLogger.log.xxxxx=
+# !!! Uncomment below loggers when you are in trouble
+#org.slf4j.simpleLogger.log.org.pf4j.PluginClassLoader=trace
+#org.slf4j.simpleLogger.log.org.pf4j.AbstractExtensionFinder=trace
+
+# Set to true if you want the current date and time to be included in output messages.
+# Default is false, and will output the number of milliseconds elapsed since startup.
+#org.slf4j.simpleLogger.showDateTime=false
+org.slf4j.simpleLogger.showDateTime=true
+
+# The date and time format to be used in the output messages.
+# The pattern describing the date and time format is the same that is used in java.text.SimpleDateFormat.
+# If the format is not specified or is invalid, the default format is used.
+# The default format is yyyy-MM-dd HH:mm:ss:SSS Z.
+#org.slf4j.simpleLogger.dateTimeFormat=yyyy-MM-dd HH:mm:ss:SSS Z
+org.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss
+
+# Set to true if you want to output the current thread name.
+# Defaults to true.
+#org.slf4j.simpleLogger.showThreadName=true
+
+# Set to true if you want the Logger instance name to be included in output messages.
+# Defaults to true.
+#org.slf4j.simpleLogger.showLogName=true
+
+# Set to true if you want the last component of the name to be included in output messages.
+# Defaults to false.
+#org.slf4j.simpleLogger.showShortLogName=false
diff --git a/pom.xml b/pom.xml
index 97e2c30..630ff4d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -46,8 +46,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.release>8</maven.compiler.release>
- <slf4j.version>1.7.30</slf4j.version>
- <log4j.version>2.17.1</log4j.version>
+ <slf4j.version>2.0.6</slf4j.version>
<asm.version>9.1</asm.version>
<junit.version>5.4.0</junit.version>