We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5b9fbbf commit a7dda53Copy full SHA for a7dda53
1 file changed
app/src/main/java/com/artem/lendingwidget/extensions/LoggingExtensions.kt
@@ -4,6 +4,7 @@ import android.content.Context
4
import java.io.File
5
import java.io.FileWriter
6
import java.io.PrintWriter
7
+import java.util.*
8
9
private const val ERROR_LOG_FILE = "errors.txt"
10
private const val DEFAULT_MAX_LINES = 1000
@@ -14,6 +15,7 @@ fun Context.logError(e: Throwable) {
14
15
16
val writer = PrintWriter(FileWriter(errorLog, true))
17
writer.appendln(SEPERATOR)
18
+ writer.appendln(Date(System.currentTimeMillis()).toString())
19
e.printStackTrace(writer)
20
writer.close()
21
0 commit comments