diff --git a/build.gradle.kts b/build.gradle.kts index 740b1ba..b404721 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,3 +1,5 @@ +import com.github.jengelman.gradle.plugins.shadow.transformers.Log4j2PluginsCacheFileTransformer + plugins { application idea @@ -33,7 +35,7 @@ dependencies { implementation("org.telegram:telegrambots-client:8.0.0") implementation("org.telegram:telegrambots-extensions:8.0.0") implementation("org.telegram:telegrambots-longpolling:8.0.0") - // implementation("pl.tkowalcz.tjahzi:log4j2-appender:0.9.32") + implementation("pl.tkowalcz.tjahzi:log4j2-appender:0.9.32") testAnnotationProcessor("org.projectlombok:lombok:1.18.36") testImplementation(platform("org.junit:junit-bom:5.11.4")) @@ -58,6 +60,10 @@ repositories { mavenCentral() } +tasks.shadowJar { + transform(Log4j2PluginsCacheFileTransformer()) +} + tasks.test { useJUnitPlatform() } diff --git a/src/main/resources/log4j2.xml b/src/main/resources/log4j2.xml index 593d1b4..69f8e1a 100644 --- a/src/main/resources/log4j2.xml +++ b/src/main/resources/log4j2.xml @@ -3,8 +3,8 @@ %d{HH:mm:ss.SSS} %5p --- [%t] %c : %m%n UTF-8 - - + %d{yyyy-MM-dd HH:mm:ss.SSS} %5p --- [%t] %c : %m%n + UTF-8 @@ -15,23 +15,23 @@ - - - + + ${env:LOKI_HOST} + ${env:LOKI_PORT} - - + ${env:LOKI_USERNAME} + ${env:LOKI_PASSWORD} - + - - - + - +