Skip to content

Commit

Permalink
core: disable colors when the output isn't compatible
Browse files Browse the repository at this point in the history
Signed-off-by: Eloi Charpentier <[email protected]>
  • Loading branch information
eckter committed Nov 12, 2024
1 parent f05eecf commit 13dfc5c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ dependencies {

// the logging API stub
implementation libs.slf4j
implementation libs.jansi

// the logging API implementation
implementation libs.logback.core
Expand Down
1 change: 1 addition & 0 deletions core/gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ mockito-junit-jupiter = { module = 'org.mockito:mockito-junit-jupiter', version.
junit-platform-launcher = { module = 'org.junit.platform:junit-platform-launcher', version = '1.11.+' } # EPL 2.0
jcip-annotations = { module = 'net.jcip:jcip-annotations', version = '1.0' } # CC Attribution
spotbugs-annotations = { module = 'com.github.spotbugs:spotbugs-annotations', version = '4.8.+' } # LGPLv2.1
jansi = { module = 'org.fusesource.jansi:jansi', version = '2.4.+' } # Apache 2.0

opentelemetry-api = { module = 'io.opentelemetry:opentelemetry-api', version.ref = 'otel' }
opentelemetry-instrumentation-annotations = { module = 'io.opentelemetry.instrumentation:opentelemetry-instrumentation-annotations', version = '2.9.0' }
Expand Down
1 change: 1 addition & 0 deletions core/src/main/resources/logback.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<configuration>
<appender name="COLOR" class="ch.qos.logback.core.ConsoleAppender">
<withJansi>true</withJansi>
<encoder>
<pattern>[%date{"HH:mm:ss,SSS"}] %highlight(%-7([%level])) %23([%logger{0}]) %msg%n</pattern>
</encoder>
Expand Down

0 comments on commit 13dfc5c

Please sign in to comment.