File tree Expand file tree Collapse file tree 4 files changed +10
-11
lines changed Expand file tree Collapse file tree 4 files changed +10
-11
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,7 @@ kotlin {
47
47
}
48
48
commonMain.dependencies {
49
49
implementation(project(" :log4k" ))
50
+ implementation(project(" :log4k-slf4j" ))
50
51
implementation(compose.runtime)
51
52
implementation(compose.foundation)
52
53
implementation(compose.material)
@@ -56,6 +57,7 @@ kotlin {
56
57
}
57
58
desktopMain.dependencies {
58
59
implementation(compose.desktop.currentOs)
60
+ implementation(libs.slf4j.simple)
59
61
}
60
62
}
61
63
}
@@ -71,11 +73,6 @@ android {
71
73
versionCode = 1
72
74
versionName = libs.versions.log4k.demo.get()
73
75
}
74
- packaging {
75
- resources {
76
- excludes + = " /META-INF/{AL2.0,LGPL2.1}"
77
- }
78
- }
79
76
buildTypes {
80
77
release {
81
78
isMinifyEnabled = false
Original file line number Diff line number Diff line change 1
1
import androidx.compose.ui.window.Window
2
2
import androidx.compose.ui.window.application
3
- import saschpe.log4k.FileLogger
4
- import saschpe.log4k.FileLogger.Limit
5
- import saschpe.log4k.FileLogger.Rotate
6
3
import saschpe.log4k.Log
4
+ import saschpe.log4k.slf4j.SLF4JLogger
7
5
8
6
fun main () = application {
9
- Log .loggers + = FileLogger (rotate = Rotate .Daily , limit = Limit .Files (max = 5 ))
7
+ Log .loggers.clear()
8
+ Log .loggers + = SLF4JLogger ()
9
+ System .setProperty(" org.slf4j.simpleLogger.defaultLogLevel" , " debug" )
10
10
Log .debug { " Desktop main" }
11
11
12
12
Window (
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ kotlin = "2.0.20"
10
10
ktlint = " 1.3.1"
11
11
log4k-demo = " 1.0.0"
12
12
mockk = " 1.13.12"
13
+ slf4j = " 2.0.16"
13
14
14
15
[libraries ]
15
16
androidx-activity-compose = " androidx.activity:activity-compose:1.9.2"
@@ -18,7 +19,8 @@ kotlinx-datetime = "org.jetbrains.kotlinx:kotlinx-datetime:0.6.1"
18
19
kotlinx-io = " org.jetbrains.kotlinx:kotlinx-io-core:0.5.4"
19
20
mockk = { module = " io.mockk:mockk" , version.ref = " mockk" }
20
21
mockk-android = { module = " io.mockk:mockk-android" , version.ref = " mockk" }
21
- slf4j-api = " org.slf4j:slf4j-api:1.7.36"
22
+ slf4j-api = { module = " org.slf4j:slf4j-api" , version.ref = " slf4j" }
23
+ slf4j-simple = { module = " org.slf4j:slf4j-simple" , version.ref = " slf4j" }
22
24
23
25
[plugins ]
24
26
android-application = { id = " com.android.application" , version.ref = " gradle-android" }
You can’t perform that action at this time.
0 commit comments