Skip to content

Commit

Permalink
Fix logcat debug and verbose (#342)
Browse files Browse the repository at this point in the history
  • Loading branch information
kpgalligan authored Mar 31, 2023
1 parent e8c1f0b commit b1058de
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ org.gradle.jvmargs=-Xmx2g
SONATYPE_HOST=DEFAULT
RELEASE_SIGNING_ENABLED=true
GROUP=co.touchlab
VERSION_NAME=2.0.0-RC3
VERSION_NAME=2.0.0-RC4
KOTLIN_VERSION=1.8.10

POM_NAME=Kermit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,6 @@ class LogcatWriter(private val messageStringFormatter: MessageStringFormatter =
// When running unit tests, Log calls will fail. Back up to a common writer
private val testWriter: CommonWriter = CommonWriter(messageStringFormatter)

private fun getSeverity(severity: Severity) = when (severity) {
Severity.Verbose -> Log.VERBOSE
Severity.Debug -> Log.DEBUG
Severity.Info -> Log.INFO
Severity.Warn -> Log.WARN
Severity.Error -> Log.ERROR
Severity.Assert -> Log.ASSERT
}

override fun isLoggable(tag: String, severity: Severity): Boolean {
return Log.isLoggable(tag, getSeverity(severity))
}

override fun log(severity: Severity, message: String, tag: String, throwable: Throwable?) {
val formattedMessage = messageStringFormatter.formatMessage(null, null, Message(message))
try {
Expand Down

0 comments on commit b1058de

Please sign in to comment.