Update Log4j2 config and shadowJar transformer usage

Removed the custom 'packages' attribute from log4j2.xml configuration and updated the shadowJar task to use the class reference for Log4j2PluginsCacheFileTransformer. This streamlines configuration and aligns with recommended usage.
This commit is contained in:
2025-11-14 01:05:24 +07:00
parent 2b1dabf6a1
commit 68d1ad707a
2 changed files with 2 additions and 4 deletions
+1 -3
View File
@@ -1,5 +1,3 @@
import com.github.jengelman.gradle.plugins.shadow.transformers.Log4j2PluginsCacheFileTransformer
plugins {
application
idea
@@ -61,7 +59,7 @@ repositories {
}
tasks.shadowJar {
transform(Log4j2PluginsCacheFileTransformer())
transform(com.github.jengelman.gradle.plugins.shadow.transformers.Log4j2PluginsCacheFileTransformer::class.java)
}
tasks.test {
+1 -1
View File
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configuration packages="pl.tkowalcz.tjahzi.log4j2" status="WARN">
<Configuration status="WARN">
<Properties>
<Property name="CONSOLE_LOG_PATTERN">%d{HH:mm:ss.SSS} %5p --- [%t] %c : %m%n</Property>
<Property name="CONSOLE_LOG_CHARSET">UTF-8</Property>