diff options
author | Decebal Suiu <decebal.suiu@gmail.com> | 2020-04-22 09:58:24 +0300 |
---|---|---|
committer | Decebal Suiu <decebal.suiu@gmail.com> | 2020-04-22 09:58:24 +0300 |
commit | fd72b5389257ef2a38b71e5f0f45e09e26b3501a (patch) | |
tree | 3cc4de5ed8ea3ba2be88a8d65b46f1afa6742610 /pf4j | |
parent | a01cd8ac5b0b73dfb1c7a43d24be261aa2f13405 (diff) | |
download | pf4j-fd72b5389257ef2a38b71e5f0f45e09e26b3501a.tar.gz pf4j-fd72b5389257ef2a38b71e5f0f45e09e26b3501a.zip |
Switch to Log4j2
Diffstat (limited to 'pf4j')
-rw-r--r-- | pf4j/pom.xml | 26 | ||||
-rw-r--r-- | pf4j/src/test/resources/log4j.properties | 20 | ||||
-rw-r--r-- | pf4j/src/test/resources/log4j2.properties | 27 |
3 files changed, 47 insertions, 26 deletions
diff --git a/pf4j/pom.xml b/pf4j/pom.xml index dd8e519..c67e0f2 100644 --- a/pf4j/pom.xml +++ b/pf4j/pom.xml @@ -73,12 +73,6 @@ <version>${slf4j.version}</version> </dependency> <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-log4j12</artifactId> - <version>${slf4j.version}</version> - <scope>test</scope> - </dependency> - <dependency> <groupId>com.github.zafarkhaja</groupId> <artifactId>java-semver</artifactId> <version>0.9.0</version> @@ -90,6 +84,26 @@ <optional>true</optional> </dependency> + <!-- 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> + <scope>test</scope> + </dependency> + <!-- Testing --> <dependency> <groupId>org.hamcrest</groupId> diff --git a/pf4j/src/test/resources/log4j.properties b/pf4j/src/test/resources/log4j.properties deleted file mode 100644 index 7edd29c..0000000 --- a/pf4j/src/test/resources/log4j.properties +++ /dev/null @@ -1,20 +0,0 @@ -log4j.rootLogger=DEBUG, Console - -# -# PF4J log -# -log4j.logger.org.pf4j=DEBUG, Console -# !!! Put the bellow classes on level TRACE when you are in trouble -log4j.logger.org.pf4j.PluginClassLoader=WARN, Console -log4j.logger.org.pf4j.AbstractExtensionFinder=DEBUG, Console -log4j.additivity.org.pf4j=false -log4j.additivity.org.pf4j.PluginClassLoader=false -log4j.additivity.org.pf4j.AbstractExtensionFinder=false - -# -# Appenders -# -log4j.appender.Console=org.apache.log4j.ConsoleAppender -log4j.appender.Console.layout=org.apache.log4j.PatternLayout -#log4j.appender.Console.layout.conversionPattern=%-5p - %-32.32c{1} - %m\n -log4j.appender.Console.layout.ConversionPattern=%d %p %c - %m%n diff --git a/pf4j/src/test/resources/log4j2.properties b/pf4j/src/test/resources/log4j2.properties new file mode 100644 index 0000000..958b8d2 --- /dev/null +++ b/pf4j/src/test/resources/log4j2.properties @@ -0,0 +1,27 @@ +# +# 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 |