logs: make logPaths work

we have to tail via sudo script

Fixes #811
This commit is contained in:
Girish Ramakrishnan
2024-02-22 18:08:32 +01:00
parent ce42680888
commit d0dc104ede
10 changed files with 29 additions and 27 deletions
+1 -1
View File
@@ -2050,7 +2050,7 @@ async function getLogs(app, options) {
const cp = logs.tail(logPaths, { lines: options.lines, follow: options.follow });
const logStream = new logs.LogStream({ format: options.format || 'json', source: appId });
logStream.close = cp.kill.bind(cp, 'SIGKILL'); // hook for caller. closing stream kills the child process
logStream.close = cp.kill.bind(cp, 'SIGTERM'); // hook for caller. closing stream kills the child process
cp.stdout.pipe(logStream);