getLocalLogfilePaths -> getLogPaths
This commit is contained in:
@@ -56,7 +56,7 @@ exports = module.exports = {
|
||||
listBackups,
|
||||
|
||||
getTask,
|
||||
getLocalLogfilePaths,
|
||||
getLogPaths,
|
||||
getLogs,
|
||||
|
||||
getCertificate,
|
||||
@@ -1792,7 +1792,7 @@ async function updateApp(app, data, auditSource) {
|
||||
return { taskId };
|
||||
}
|
||||
|
||||
function getLocalLogfilePaths(app) {
|
||||
async function getLogPaths(app) {
|
||||
assert.strictEqual(typeof app, 'object');
|
||||
|
||||
const appId = app.id;
|
||||
@@ -1824,7 +1824,8 @@ async function getLogs(app, options) {
|
||||
const args = [ '--lines=' + 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
|
||||
|
||||
const cp = spawn('/usr/bin/tail', args.concat(getLocalLogfilePaths(app)));
|
||||
const logPaths = await getLogPaths(app);
|
||||
const cp = spawn('/usr/bin/tail', args.concat(logPaths));
|
||||
|
||||
const transformStream = split(function mapper(line) {
|
||||
if (format !== 'json') return line + '\n';
|
||||
|
||||
Reference in New Issue
Block a user