public class TombstoneManager
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static boolean |
appendSection(java.lang.String logPath,
java.lang.String key,
java.lang.String content)
Append a customs section (a key-content pair) to the crash log file.
|
static boolean |
clearAllTombstones()
Delete all Java exception, native crash and ANR log files.
|
static boolean |
clearAnrTombstones()
Delete all ANR log files.
|
static boolean |
clearJavaTombstones()
Delete all Java exception log files.
|
static boolean |
clearNativeTombstones()
Delete all native crash log files.
|
static boolean |
deleteTombstone(java.io.File file)
Delete the tombstone file.
|
static boolean |
deleteTombstone(java.lang.String path)
Delete the tombstone file.
|
static java.io.File[] |
getAllTombstones()
Get all Java exception, native crash and ANR log files.
|
static java.io.File[] |
getAnrTombstones()
Get all ANR log files.
|
static java.io.File[] |
getJavaTombstones()
Get all Java exception log files.
|
static java.io.File[] |
getNativeTombstones()
Get all native crash log files.
|
static boolean |
isAnr(java.io.File log)
Determines if the current log file recorded an ANR.
|
static boolean |
isJavaCrash(java.io.File log)
Determines if the current log file recorded a Java exception.
|
static boolean |
isNativeCrash(java.io.File log)
Determines if the current log file recorded a native crash.
|
public static boolean appendSection(java.lang.String logPath,
java.lang.String key,
java.lang.String content)
TombstoneParser, you can retrieve the content with the key specified here.
Note: This method is generally used in ICrashCallback.onCrash(String, String).
Warning: Do NOT include multiple consecutive newline characters ("\n\n") in the content string. This will break the parsing rules.
logPath - Absolute path of the crash log file.key - Section key.content - Section content.public static boolean isJavaCrash(java.io.File log)
log - Object of the log file.public static boolean isNativeCrash(java.io.File log)
log - Object of the log file.public static boolean isAnr(java.io.File log)
log - Object of the log file.public static java.io.File[] getJavaTombstones()
public static java.io.File[] getNativeTombstones()
public static java.io.File[] getAnrTombstones()
public static java.io.File[] getAllTombstones()
public static boolean deleteTombstone(java.io.File file)
Note: When you use the placeholder file feature by XCrash.InitParameters.setPlaceholderCountMax(int),
please always use this method to delete tombstone files.
file - The tombstone file object.public static boolean deleteTombstone(java.lang.String path)
Note: When you use the placeholder file feature by XCrash.InitParameters.setPlaceholderCountMax(int),
please always use this method to delete tombstone files.
path - The path of the tombstone file.public static boolean clearJavaTombstones()
public static boolean clearNativeTombstones()
public static boolean clearAnrTombstones()
public static boolean clearAllTombstones()