summary refs log tree commit diff homepage
diff options
context:
space:
mode:
authorFeiko Joosten <feiko_joosten@hotmail.com>2020-07-17 22:06:44 +0200
committerGitHub <noreply@github.com>2020-07-17 22:06:44 +0200
commite34d07a2069bda546f519c7aaf7aa8fe634d20c2 (patch)
treeac538707485fb90408f5debce285c0842ae5bdc0
parentMerge pull request #54 from TheZackCodec/tellraw_regex_improvement (diff)
downloadshulker-e34d07a2069bda546f519c7aaf7aa8fe634d20c2.tar.gz
shulker-e34d07a2069bda546f519c7aaf7aa8fe634d20c2.zip
Changed tail to make use of watch file.
Fixed an issue where the log file required a manual refresh before the new lines were detected.
Diffstat (limited to '')
-rw-r--r--src/MinecraftHandler.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/MinecraftHandler.ts b/src/MinecraftHandler.ts
index 96b525a..1b741f0 100644
--- a/src/MinecraftHandler.ts
+++ b/src/MinecraftHandler.ts
@@ -180,7 +180,8 @@ class MinecraftHandler {
   private initTail (callback: Callback) {
     if (fs.existsSync(this.config.LOCAL_FILE_PATH)) {
       console.log(`[INFO] Using configuration for local log file at "${this.config.LOCAL_FILE_PATH}"`)
-      this.tail = new Tail(this.config.LOCAL_FILE_PATH)
+	    var options= {useWatchFile: true}
+      this.tail = new Tail(this.config.LOCAL_FILE_PATH, options)
     } else {
       throw new Error(`[ERROR] Local log file not found at "${this.config.LOCAL_FILE_PATH}"`)
     }