mirror of
https://github.com/tiennm99/store-scraper-bot-java.git
synced 2026-05-14 11:53:03 +00:00
feat(loki): add loki again
after fix shadow jar issue
This commit is contained in:
+7
-1
@@ -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()
|
||||
}
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
<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>
|
||||
<!--<Property name="LOKI_LOG_PATTERN">%d{yyyy-MM-dd HH:mm:ss.SSS} %5p --- [%t] %c : %m%n</Property>-->
|
||||
<!--<Property name="LOKI_LOG_CHARSET">UTF-8</Property>-->
|
||||
<Property name="LOKI_LOG_PATTERN">%d{yyyy-MM-dd HH:mm:ss.SSS} %5p --- [%t] %c : %m%n</Property>
|
||||
<Property name="LOKI_LOG_CHARSET">UTF-8</Property>
|
||||
</Properties>
|
||||
|
||||
<Appenders>
|
||||
@@ -15,23 +15,23 @@
|
||||
</Filters>
|
||||
</Console>
|
||||
|
||||
<!--<Loki name="Loki">-->
|
||||
<!-- <host>${env:LOKI_HOST}</host>-->
|
||||
<!-- <port>${env:LOKI_PORT}</port>-->
|
||||
<Loki name="Loki">
|
||||
<host>${env:LOKI_HOST}</host>
|
||||
<port>${env:LOKI_PORT}</port>
|
||||
|
||||
<!-- <username>${env:LOKI_USERNAME}</username>-->
|
||||
<!-- <password>${env:LOKI_PASSWORD}</password>-->
|
||||
<username>${env:LOKI_USERNAME}</username>
|
||||
<password>${env:LOKI_PASSWORD}</password>
|
||||
|
||||
<!-- <PatternLayout pattern="${LOKI_LOG_PATTERN}" charset="${LOKI_LOG_CHARSET}"/>-->
|
||||
<PatternLayout pattern="${LOKI_LOG_PATTERN}" charset="${LOKI_LOG_CHARSET}"/>
|
||||
|
||||
<!-- <Label name="service_name" value="StoreScraperBot"/>-->
|
||||
<!-- <Label name="environment" value="${env:ENV}"/>-->
|
||||
<!--</Loki>-->
|
||||
<Label name="service_name" value="StoreScraperBot"/>
|
||||
<Label name="environment" value="${env:ENV}"/>
|
||||
</Loki>
|
||||
</Appenders>
|
||||
<Loggers>
|
||||
<Root level="${env:LOG_LEVEL:-debug}">
|
||||
<AppenderRef ref="ConsoleAppender"/>
|
||||
<!--<AppenderRef ref="Loki"/>-->
|
||||
<AppenderRef ref="Loki"/>
|
||||
</Root>
|
||||
</Loggers>
|
||||
</Configuration>
|
||||
|
||||
Reference in New Issue
Block a user