Fix PersistentTree logging to append
This commit is contained in:
parent
31e81f31b4
commit
260c49d8d5
1 changed files with 2 additions and 1 deletions
|
@ -8,6 +8,7 @@ import kotlinx.coroutines.launch
|
|||
import kotlinx.coroutines.withContext
|
||||
import timber.log.Timber
|
||||
import java.io.File
|
||||
import java.io.FileOutputStream
|
||||
import java.io.IOException
|
||||
import java.io.PrintStream
|
||||
import java.text.SimpleDateFormat
|
||||
|
@ -35,7 +36,7 @@ class PersistentTree private constructor(private val logFile: File) : Timber.Tre
|
|||
Log.WARN -> "W"
|
||||
else -> "U"
|
||||
}
|
||||
logFile.outputStream().use { stream ->
|
||||
FileOutputStream(logFile, true).use { stream ->
|
||||
stream.bufferedWriter().use {
|
||||
it.appendLine("$timestamp $priorityLetter/${tag ?: "SimpleMarkdown"}: $message")
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue