|
|
|
@ -1,6 +1,7 @@
|
|
|
|
|
package com.idormy.sms.forwarder.utils
|
|
|
|
|
|
|
|
|
|
import android.content.Context
|
|
|
|
|
import android.os.Build
|
|
|
|
|
import com.idormy.sms.forwarder.App
|
|
|
|
|
import java.io.File
|
|
|
|
|
import java.io.FileWriter
|
|
|
|
@ -40,6 +41,8 @@ object Log {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fun logToFile(level: String, tag: String, message: String) {
|
|
|
|
|
if (Build.DEVICE == null) return
|
|
|
|
|
|
|
|
|
|
if (!::appContext.isInitialized) {
|
|
|
|
|
throw IllegalStateException("Log not initialized. Call init(context) first.")
|
|
|
|
|
}
|
|
|
|
|