@@ -16,6 +16,8 @@ import java.util.logging.LogRecord
1616/* *
1717 * Logging handler that logs to Android logcat.
1818 *
19+ * Log level mapping: https://source.android.com/docs/core/tests/debug/understanding-logging#log-standards
20+ *
1921 * @param fallbackTag adb tag to use if class name can't be determined
2022 */
2123class LogcatHandler (
@@ -47,11 +49,20 @@ class LogcatHandler(
4749 tag
4850
4951 when {
50- level >= Level .SEVERE .intValue() -> Log .e(tagOrTruncated, text, r.thrown)
51- level >= Level .WARNING .intValue() -> Log .w(tagOrTruncated, text, r.thrown)
52- level >= Level .CONFIG .intValue() -> Log .i(tagOrTruncated, text, r.thrown)
53- level >= Level .FINER .intValue() -> Log .d(tagOrTruncated, text, r.thrown)
54- else -> Log .v(tagOrTruncated, text, r.thrown)
52+ level >= Level .SEVERE .intValue() ->
53+ Log .e(tagOrTruncated, text, r.thrown)
54+
55+ level >= Level .WARNING .intValue() ->
56+ Log .w(tagOrTruncated, text, r.thrown)
57+
58+ level >= Level .INFO .intValue() ->
59+ Log .i(tagOrTruncated, text, r.thrown)
60+
61+ level >= Level .FINE .intValue() -> // CONFIG, FINE
62+ Log .d(tagOrTruncated, text, r.thrown)
63+
64+ else -> // FINER, FINEST
65+ Log .v(tagOrTruncated, text, r.thrown)
5566 }
5667 }
5768
0 commit comments