API reference

LogcatMonitor Object

Logcat monitoring for crash detection.
Monitors logcat output for crash indicators and ANRs.

Signature

object LogcatMonitor

Methods

captureANRs ( packageName )
Signature
fun captureANRs(packageName: String): List<String>
Parameters
packageName: String
Returns
List<String>
captureRecentCrashes ( packageName , lines )
Signature
fun captureRecentCrashes(packageName: String, lines: Int = 500): List<LogcatMonitor.LogcatCrash>
Parameters
packageName: String
lines: Int
Returns
List<LogcatMonitor.LogcatCrash>
exportLogcat ( outputPath , lines )
Signature
fun exportLogcat(outputPath: String, lines: Int = 1000): Boolean
Parameters
outputPath: String
lines: Int
Returns
Boolean

Inner Class

LogcatCrash Class

Signature

data class LogcatCrash(
    val timestamp: Long,
    val pid: Int,
    val tid: Int,
    val level: String,
    val tag: String,
    val message: String,
    val stackTrace: List<String>,
)

Constructors

LogcatCrash ( timestamp , pid , tid , level , tag , message , stackTrace )
Signature
constructor(
    timestamp: Long,
    pid: Int,
    tid: Int,
    level: String,
    tag: String,
    message: String,
    stackTrace: List<String>,
)
Parameters
timestamp: Long
pid: Int
tid: Int
level: String
tag: String
message: String
stackTrace: List<String>
Returns
LogcatMonitor.LogcatCrash

Properties

level : String
[Get]
Signature
val level: String
message : String
[Get]
Signature
val message: String
pid : Int
[Get]
Signature
val pid: Int
stackTrace : List<String>
[Get]
Signature
val stackTrace: List<String>
tag : String
[Get]
Signature
val tag: String
tid : Int
[Get]
Signature
val tid: Int
timestamp : Long
[Get]
Signature
val timestamp: Long

Methods

toJson ()
Signature
fun toJson(): JSONObject
Returns
JSONObject