From c9a488b9b157e4dbecd714171b8c73fc145d4bd2 Mon Sep 17 00:00:00 2001 From: beepbeat Date: Sun, 10 Sep 2017 01:08:07 +0200 Subject: [PATCH] DEbug stuff --- src/LogHandler.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/LogHandler.kt b/src/LogHandler.kt index ede71f1..6794e45 100644 --- a/src/LogHandler.kt +++ b/src/LogHandler.kt @@ -88,8 +88,9 @@ open class listener : TailerListenerAdapter(){ try{ if (message == "DEBUG"){ - - FileUtils.writeLines(File("debug.log"), rescues.asStringArray()) + val file = File("debug.log") + if (!file.exists()) file.createNewFile() + FileUtils.writeLines(file, rescues.asStringArray()) } if (message.toCharArray()[0] == '!'){