Skip to content
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ group = "com.mindera.lodge"
version = "1.0.0"

kotlin {
jvmToolchain(8)
jvmToolchain(11)
androidTarget()
jvm()
iosX64()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,9 @@ class LogcatAppender(
} else {
val chunks = ceil((1f * length / maxLineLength).toDouble()).toInt()
for (i in 1..chunks) {
val start = maxLineLength * (i - 1)
val max = maxLineLength * i
if (max < length) {
it.add("[Chunk $i of $chunks] " + substring(maxLineLength * (i - 1), max))
} else {
it.add("[Chunk $i of $chunks] " + substring(maxLineLength * (i - 1)))
}
it.add(if (max < length) substring(start, max) else substring(start))
}
Comment thread
tiper marked this conversation as resolved.
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,7 @@ class OSAppender(
override fun log(severity: SEVERITY, tag: String, t: Throwable?, log: String) {
with(severity.toLevel()) {
val prefix = severity.prefix(tag)
log(prefix + log)
t?.let {
log(prefix + it.stackTraceToString())
}
log(t?.let { prefix + "$log\n" + it.stackTraceToString() } ?: (prefix + log))
}
Comment thread
tiper marked this conversation as resolved.
}

Expand Down
Loading
Loading