Skip to content

Commit 2b3b86b

Browse files
author
m.zharinova
committed
fix logs in kotlin app
1 parent 370d869 commit 2b3b86b

File tree

17 files changed

+90
-54
lines changed

17 files changed

+90
-54
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
kotlin version: 2.0.21
2+
error message: The daemon has terminated unexpectedly on startup attempt #1 with error code: 0. The daemon process output:
3+
1. Kotlin compile daemon is ready
4+

buildSrc/src/main/kotlin/sb-ot-demo.java-compile.gradle.kts

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,18 @@
1+
/*
2+
* Copyright (c) 2020-2025. Ivan Vakhrushev and others.
3+
* https://github.com/mfvanek/spring-boot-open-telemetry-demo
4+
*
5+
* Licensed under the Apache License 2.0
6+
*/
7+
18
import gradle.kotlin.dsl.accessors._82e33fab8c067a1df5c2e280e32692b4.check
2-
import gradle.kotlin.dsl.accessors._82e33fab8c067a1df5c2e280e32692b4.checkstyleMain
3-
import gradle.kotlin.dsl.accessors._82e33fab8c067a1df5c2e280e32692b4.checkstyleTest
4-
import gradle.kotlin.dsl.accessors._82e33fab8c067a1df5c2e280e32692b4.implementation
5-
import gradle.kotlin.dsl.accessors._82e33fab8c067a1df5c2e280e32692b4.jacoco
69
import gradle.kotlin.dsl.accessors._82e33fab8c067a1df5c2e280e32692b4.jacocoTestCoverageVerification
710
import gradle.kotlin.dsl.accessors._82e33fab8c067a1df5c2e280e32692b4.jacocoTestReport
811
import gradle.kotlin.dsl.accessors._82e33fab8c067a1df5c2e280e32692b4.java
912
import gradle.kotlin.dsl.accessors._82e33fab8c067a1df5c2e280e32692b4.osdetector
10-
import gradle.kotlin.dsl.accessors._82e33fab8c067a1df5c2e280e32692b4.pmdMain
11-
import gradle.kotlin.dsl.accessors._82e33fab8c067a1df5c2e280e32692b4.pmdTest
12-
import gradle.kotlin.dsl.accessors._82e33fab8c067a1df5c2e280e32692b4.spotbugsMain
13-
import gradle.kotlin.dsl.accessors._82e33fab8c067a1df5c2e280e32692b4.spotbugsTest
1413
import gradle.kotlin.dsl.accessors._82e33fab8c067a1df5c2e280e32692b4.test
1514
import gradle.kotlin.dsl.accessors._82e33fab8c067a1df5c2e280e32692b4.testImplementation
1615
import gradle.kotlin.dsl.accessors._82e33fab8c067a1df5c2e280e32692b4.testRuntimeOnly
17-
import net.ltgt.gradle.errorprone.errorprone
1816

1917
plugins {
2018
id("java")

spring-boot-3-demo-app-kotlin/src/main/kotlin/io/github/mfvanek/spring/boot3/kotlin/test/Application.kt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
/*
2+
* Copyright (c) 2020-2025. Ivan Vakhrushev and others.
3+
* https://github.com/mfvanek/spring-boot-open-telemetry-demo
4+
*
5+
* Licensed under the Apache License 2.0
6+
*/
7+
18
package io.github.mfvanek.spring.boot3.kotlin.test
29

310
import org.springframework.boot.autoconfigure.SpringBootApplication

spring-boot-3-demo-app-kotlin/src/main/kotlin/io/github/mfvanek/spring/boot3/kotlin/test/HomeController.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
*
55
* Licensed under the Apache License 2.0
66
*/
7+
78
package io.github.mfvanek.spring.boot3.kotlin.test
89

910
import org.springframework.web.bind.annotation.GetMapping

spring-boot-3-demo-app-kotlin/src/main/kotlin/io/github/mfvanek/spring/boot3/kotlin/test/RedirectController.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@
44
*
55
* Licensed under the Apache License 2.0
66
*/
7+
78
package io.github.mfvanek.spring.boot3.kotlin.test
89

10+
import java.net.URI
911
import org.springframework.http.HttpHeaders
1012
import org.springframework.http.HttpStatus
1113
import org.springframework.http.ResponseEntity
1214
import org.springframework.web.bind.annotation.GetMapping
1315
import org.springframework.web.bind.annotation.RestController
14-
import java.net.URI
1516

1617
@RestController
1718
class RedirectController {

spring-boot-3-demo-app-kotlin/src/main/kotlin/io/github/mfvanek/spring/boot3/kotlin/test/TimeController.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class TimeController(
3333
val nowFromRemote = publicApiService.getZonedTime()
3434
val now = nowFromRemote ?: LocalDateTime.now(clock)
3535
kafkaSendingService.sendNotification("Current time = $now")
36-
.thenRun { logger.info("Awaiting acknowledgement from Kafka") }
36+
.thenRun { logger.info{"Awaiting acknowledgement from Kafka"} }
3737
.get()
3838
return now
3939
}

spring-boot-3-demo-app-kotlin/src/main/kotlin/io/github/mfvanek/spring/boot3/kotlin/test/config/ClockConfig.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
*
55
* Licensed under the Apache License 2.0
66
*/
7+
78
package io.github.mfvanek.spring.boot3.kotlin.test.config
89

910
import org.springframework.context.annotation.Bean

spring-boot-3-demo-app-kotlin/src/main/kotlin/io/github/mfvanek/spring/boot3/kotlin/test/config/OpenTelemetryConfig.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
*
55
* Licensed under the Apache License 2.0
66
*/
7+
78
package io.github.mfvanek.spring.boot3.kotlin.test.config
89

910
import io.opentelemetry.exporter.otlp.trace.OtlpGrpcSpanExporter

spring-boot-3-demo-app-kotlin/src/main/kotlin/io/github/mfvanek/spring/boot3/kotlin/test/config/SecurityConfig.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
*
55
* Licensed under the Apache License 2.0
66
*/
7+
78
package io.github.mfvanek.spring.boot3.kotlin.test.config
89

910
import org.springframework.context.annotation.Bean

spring-boot-3-demo-app-kotlin/src/main/kotlin/io/github/mfvanek/spring/boot3/kotlin/test/config/WebClientConfig.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
*
55
* Licensed under the Apache License 2.0
66
*/
7+
78
package io.github.mfvanek.spring.boot3.kotlin.test.config
89

910
import org.springframework.beans.factory.annotation.Value
@@ -18,6 +19,6 @@ class WebClientConfig {
1819

1920
@Bean
2021
fun webClient(builder: WebClient.Builder): WebClient = builder
21-
.baseUrl(external)
22-
.build()
22+
.baseUrl(external)
23+
.build()
2324
}

0 commit comments

Comments
 (0)