Skip to content
Snippets Groups Projects
Commit 2e1f4e5a authored by Cédric Moreau's avatar Cédric Moreau
Browse files

Fix #305 Logs were stopped

parent dbdd2839
Branches
Tags
No related merge requests found
...@@ -24,12 +24,9 @@ switch (process.argv[2]) { ...@@ -24,12 +24,9 @@ switch (process.argv[2]) {
break; break;
case "logs": case "logs":
let stats = fs.statSync(directory.INSTANCE_HOMELOG_FILE);
let fileSizeInBytes = stats.size;
let lastLines = 0.995 * fileSizeInBytes;
var tail = new Tail(directory.INSTANCE_HOMELOG_FILE, '\n', { var tail = new Tail(directory.INSTANCE_HOMELOG_FILE, '\n', {
interval: 5, interval: 5,
start: Math.max(0, lastLines) start: 0
}); });
tail.on("line", function(data) { tail.on("line", function(data) {
console.log(data); console.log(data);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment