-
Notifications
You must be signed in to change notification settings - Fork 528
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
eb18f18
commit 161ea6b
Showing
9 changed files
with
45 additions
and
4 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
...-multiplatform/library/src/androidMain/kotlin/com/kizitonwose/calendar/log/Log.android.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.kizitonwose.calendar.log | ||
|
||
import android.util.Log | ||
|
||
internal actual fun log(tag: String, message: String) { | ||
Log.w(tag, message) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
compose-multiplatform/library/src/commonMain/kotlin/com/kizitonwose/calendar/log/Log.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package com.kizitonwose.calendar.log | ||
|
||
internal expect fun log(tag: String, message: String) |
12 changes: 12 additions & 0 deletions
12
...-multiplatform/library/src/desktopMain/kotlin/com/kizitonwose/calendar/log/Log.desktop.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package com.kizitonwose.calendar.log | ||
|
||
import java.util.logging.Level | ||
import java.util.logging.Logger | ||
|
||
internal actual fun log(tag: String, message: String) { | ||
logger.warning("$tag : $message") | ||
} | ||
|
||
private val logger = Logger.getLogger("Calendar").apply { | ||
level = Level.WARNING | ||
} |
7 changes: 7 additions & 0 deletions
7
compose-multiplatform/library/src/iosMain/kotlin/com/kizitonwose/calendar/log/Log.ios.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.kizitonwose.calendar.log | ||
|
||
import platform.Foundation.NSLog | ||
|
||
internal actual fun log(tag: String, message: String) { | ||
NSLog("$tag : $message") | ||
} |
8 changes: 8 additions & 0 deletions
8
...se-multiplatform/library/src/wasmJsMain/kotlin/com/kizitonwose/calendar/log/Log.wasmJs.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package com.kizitonwose.calendar.log | ||
|
||
internal actual fun log(tag: String, message: String) { | ||
consoleLog("$tag : $message") | ||
} | ||
|
||
@JsFun("(output) => console.log(output)") | ||
private external fun consoleLog(vararg output: String?) |