File tree Expand file tree Collapse file tree 3 files changed +19
-3
lines changed Expand file tree Collapse file tree 3 files changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,8 @@ dependencies {
3434 testImplementation(" org.junit.jupiter:junit-jupiter:5.9.0" )
3535 implementation(" org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4" )
3636 implementation(" com.googlecode.soundlibs:jlayer:1.0.1.4" )
37+ implementation(" org.slf4j:slf4j-api:2.0.15" )
38+ implementation(" org.slf4j:slf4j-simple:2.0.15" )
3739}
3840tasks.withType<KotlinCompile > {
3941 kotlinOptions.jvmTarget = " 17"
Original file line number Diff line number Diff line change @@ -10,31 +10,34 @@ import org.junit.jupiter.api.Order
1010import org.junit.jupiter.api.Test
1111import org.junit.jupiter.api.TestInstance
1212import org.junit.jupiter.api.TestMethodOrder
13+ import org.slf4j.Logger
14+ import org.slf4j.LoggerFactory
1315
1416@TestInstance(TestInstance .Lifecycle .PER_CLASS )
1517@TestMethodOrder(OrderAnnotation ::class )
1618class PollyKotlinTest {
19+ private val logger: Logger = LoggerFactory .getLogger(PollyKotlinTest ::class .java)
1720 @Test
1821 @Order(1 )
1922 fun pollyDemo () =
2023 runBlocking {
2124 talkPolly()
22- println (" Test 1 passed" )
25+ logger.info (" Test 1 passed" )
2326 }
2427
2528 @Test
2629 @Order(2 )
2730 fun describeVoicesSample () =
2831 runBlocking {
2932 describeVoice()
30- println (" Test 2 passed" )
33+ logger.info (" Test 2 passed" )
3134 }
3235
3336 @Test
3437 @Order(3 )
3538 fun listLexiconsTest () =
3639 runBlocking {
3740 listLexicons()
38- println (" Test 3 passed" )
41+ logger.info (" Test 3 passed" )
3942 }
4043}
Original file line number Diff line number Diff line change 1+ <configuration >
2+ <appender name =" STDOUT" class =" ch.qos.logback.core.ConsoleAppender" >
3+ <encoder >
4+ <pattern >%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n</pattern >
5+ </encoder >
6+ </appender >
7+
8+ <root level =" info" >
9+ <appender-ref ref =" STDOUT" />
10+ </root >
11+ </configuration >
You can’t perform that action at this time.
0 commit comments