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:
Girish Ramakrishnan
2023-04-16 10:49:59 +02:00
parent e6f870b220
commit c4f4f3e914
29 changed files with 70 additions and 73 deletions

View File

@@ -136,7 +136,7 @@ async function pullImage(manifest) {
});
stream.on('error', function (error) { // this is only hit for stream error and not for some download error
debug('error pulling image %s: %j', manifest.dockerImage, error);
debug('error pulling image %s: %o', manifest.dockerImage, error);
reject(new BoxError(BoxError.DOCKER_ERROR, error.message));
});
});
@@ -477,7 +477,7 @@ async function deleteContainer(containerId) { // id can also be name
if (error && error.statusCode === 404) return;
if (error) {
debug('Error removing container %s : %j', containerId, error);
debug('Error removing container %s : %o', containerId, error);
throw new BoxError(BoxError.DOCKER_ERROR, error);
}
}
@@ -529,7 +529,7 @@ async function deleteImage(manifest) {
if (error && error.statusCode === 409) return; // another container using the image
if (error) {
debug('Error removing image %s : %j', dockerImage, error);
debug('Error removing image %s : %o', dockerImage, error);
throw new BoxError(BoxError.DOCKER_ERROR, error);
}
}