Fix clearing logs on Android and checking if logs need to be deleted
This commit is contained in:
parent
89703ba58f
commit
f14a2add0f
3 changed files with 16 additions and 12 deletions
|
@ -109,9 +109,11 @@ object Log {
|
|||
"${deviceInfo()}\n${readLogs()}\nLOGCAT:\n${getLogcat()}"
|
||||
|
||||
fun clearLogs() {
|
||||
withLock {
|
||||
logFile.delete()
|
||||
rotateLogFile.delete()
|
||||
if (logDir.exists()) {
|
||||
withLock {
|
||||
logFile.delete()
|
||||
rotateLogFile.delete()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue