mirror of
https://github.com/InsanusMokrassar/KSLog.git
synced 2025-11-13 18:00:12 +00:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| acb9b350ba | |||
| 65834ffcb4 | |||
| 7f63d30274 | |||
| 81af45ba5d | |||
| caf6a2d05c |
@@ -1,5 +1,9 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## 0.3.1
|
||||||
|
|
||||||
|
* Technical fixes for compatibility with Java 8
|
||||||
|
|
||||||
## 0.3.0
|
## 0.3.0
|
||||||
|
|
||||||
* **BREAKING CHANGE**: Filters will not accept message since this update
|
* **BREAKING CHANGE**: Filters will not accept message since this update
|
||||||
|
|||||||
12
README.md
12
README.md
@@ -25,18 +25,26 @@ KSLog.i("Some message")
|
|||||||
KSLog.i("Some tag", "Some message")
|
KSLog.i("Some tag", "Some message")
|
||||||
// OR
|
// OR
|
||||||
KSLog.i("Some tag", "Some message", IllegalArgumentException("So, that is exception :)"))
|
KSLog.i("Some tag", "Some message", IllegalArgumentException("So, that is exception :)"))
|
||||||
|
// OR
|
||||||
|
KSLog.i("Some optional tag", Exception("Optional")) { "Lazy inited message" }
|
||||||
|
// OR
|
||||||
|
KSLog.iS("Some optional tag", Exception("Optional")) { "Lazy inited message for suspendable calculation of text" }
|
||||||
// OR EVEN
|
// OR EVEN
|
||||||
KSLog.l(LogLevel.INFO, "Some tag", "Some message", IllegalArgumentException("So, that is exception :)"))
|
KSLog.l(LogLevel.INFO, "Some tag", "Some message", IllegalArgumentException("So, that is exception :)"))
|
||||||
|
// OR
|
||||||
|
KSLog.l(LogLevel.INFO, "Some optional tag", IllegalArgumentException("So, that is exception :)")) { "And lazily inited message" }
|
||||||
```
|
```
|
||||||
|
|
||||||
### A little bit deeper
|
### A little bit deeper
|
||||||
|
|
||||||
There are several important things in context of this library:
|
There are several important "terms" in context of this library:
|
||||||
|
|
||||||
* Default logger (available via `KSLog`)
|
* Default logger (available via `KSLog.default`)
|
||||||
* Local logger (can be created via `KSLog` functions and passed anywhere as `KSLog`)
|
* Local logger (can be created via `KSLog` functions and passed anywhere as `KSLog`)
|
||||||
* Logging shortcuts like `KSLog.i`/`KSLog.info`
|
* Logging shortcuts like `KSLog.i`/`KSLog.info`
|
||||||
|
|
||||||
|
Every logging extension (like `KSLog.i`) have its analog with lazy inited message text and the same one with suffix `S` (like `KSLog.iS`) for the suspendable message calculation.
|
||||||
|
|
||||||
Default logger can be created by passing `defaultTag` and one of variants log level filters: set or minimal loggable level. In `JVM` you also may setup any logger as base logger for default realizations of `KSLog`. Besides, you may use your own callback (on **any target platform**) as output of logging:
|
Default logger can be created by passing `defaultTag` and one of variants log level filters: set or minimal loggable level. In `JVM` you also may setup any logger as base logger for default realizations of `KSLog`. Besides, you may use your own callback (on **any target platform**) as output of logging:
|
||||||
|
|
||||||
```kotlin
|
```kotlin
|
||||||
|
|||||||
13
build.gradle
13
build.gradle
@@ -33,7 +33,13 @@ repositories {
|
|||||||
}
|
}
|
||||||
|
|
||||||
kotlin {
|
kotlin {
|
||||||
jvm()
|
jvm {
|
||||||
|
compilations.main {
|
||||||
|
kotlinOptions {
|
||||||
|
jvmTarget = "1.8"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
js(IR) {
|
js(IR) {
|
||||||
browser()
|
browser()
|
||||||
nodejs()
|
nodejs()
|
||||||
@@ -52,9 +58,8 @@ kotlin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
java {
|
java {
|
||||||
toolchain {
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||||
languageVersion = JavaLanguageVersion.of(8)
|
targetCompatibility = JavaVersion.VERSION_1_8
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
apply from: "defaultAndroidSettings.gradle"
|
apply from: "defaultAndroidSettings.gradle"
|
||||||
|
|||||||
@@ -9,5 +9,5 @@ android.enableJetifier=true
|
|||||||
# Project data
|
# Project data
|
||||||
|
|
||||||
group=dev.inmo
|
group=dev.inmo
|
||||||
version=0.3.0
|
version=0.3.1
|
||||||
android_code_version=7
|
android_code_version=8
|
||||||
|
|||||||
Reference in New Issue
Block a user