Support nginx logs
This commit is contained in:
@@ -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';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user