logs: use %o to format error
otherwise, they are printed as multi-line and this messes up tail+date formatting
This commit is contained in:
@@ -119,7 +119,7 @@ function upload(apiConfig, backupFilePath, sourceStream, callback) {
|
||||
});
|
||||
|
||||
fileStream.on('error', function (error) {
|
||||
debug('[%s] upload: out stream error.', backupFilePath, error);
|
||||
debug(`upload: [${backupFilePath}] out stream error. %o`, error);
|
||||
callback(new BoxError(BoxError.EXTERNAL_ERROR, error.message));
|
||||
});
|
||||
|
||||
@@ -131,7 +131,7 @@ function upload(apiConfig, backupFilePath, sourceStream, callback) {
|
||||
if (!safe.fs.chownSync(path.dirname(backupFilePath), backupUid, backupUid)) return callback(new BoxError(BoxError.EXTERNAL_ERROR, 'Unable to chown:' + safe.error.message));
|
||||
}
|
||||
|
||||
debug('upload %s: done.', backupFilePath);
|
||||
debug(`upload ${backupFilePath}: done`);
|
||||
|
||||
callback(null);
|
||||
});
|
||||
@@ -187,7 +187,7 @@ function listDir(apiConfig, dir, batchSize, iteratorCallback, callback) {
|
||||
});
|
||||
});
|
||||
entryStream.on('warn', function (error) {
|
||||
debug('listDir: warning ', error);
|
||||
debug('listDir: warning. %o', error);
|
||||
});
|
||||
entryStream.on('end', function () {
|
||||
iteratorCallback(entries, callback);
|
||||
|
||||
Reference in New Issue
Block a user