Support nginx logs

This commit is contained in:
Johannes Zellner
2020-06-15 17:12:37 +02:00
parent 5268d3f57d
commit 0aab891980
2 changed files with 10 additions and 0 deletions
+7
View File
@@ -506,6 +506,13 @@ function getServiceLogs(id, options, callback) {
args.push('--output=short-iso');
if (follow) args.push('--follow');
} else if (name === 'nginx') {
cmd = '/usr/bin/tail';
args.push('--lines=' + (lines === -1 ? '+1' : lines));
if (follow) args.push('--follow', '--retry', '--quiet'); // same as -F. to make it work if file doesn't exist, --quiet to not output file headers, which are no logs
args.push('/var/log/nginx/access.log');
args.push('/var/log/nginx/error.log');
} else {
cmd = '/usr/bin/tail';