mirror of
https://github.com/apple/container.git
synced 2026-09-28 01:46:25 -04:00
Write log/error output from commands to stderr. (#1632)
- Closes #1631. - The standard output should only contain result data, so that scripts consuming stdout don't need to scrape.
This commit is contained in:
@@ -82,7 +82,7 @@ extension Application {
|
||||
let freed = formatter.string(fromByteCount: Int64(size))
|
||||
|
||||
if didDeleteAnyImage {
|
||||
print("Reclaimed \(freed) in disk space")
|
||||
log.info("Reclaimed \(freed) in disk space")
|
||||
}
|
||||
if failures.count > 0 {
|
||||
throw ContainerizationError(.internalError, message: "failed to delete one or more images: \(failures)")
|
||||
|
||||
@@ -108,7 +108,6 @@ extension Application {
|
||||
}
|
||||
await taskManager.finish()
|
||||
progress.finish()
|
||||
print("Loaded images:")
|
||||
for image in result.images {
|
||||
print(image.reference)
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ extension Application {
|
||||
let formatter = ByteCountFormatter()
|
||||
formatter.countStyle = .file
|
||||
let freed = formatter.string(fromByteCount: Int64(size))
|
||||
print("Reclaimed \(freed) in disk space")
|
||||
log.info("Reclaimed \(freed) in disk space")
|
||||
}
|
||||
|
||||
private func hasTag(_ reference: String) -> Bool {
|
||||
|
||||
@@ -84,7 +84,7 @@ extension Application {
|
||||
do {
|
||||
images.append(try await ClientImage.get(reference: reference, containerSystemConfig: containerSystemConfig).description)
|
||||
} catch {
|
||||
print("failed to get image for reference \(reference): \(error)")
|
||||
log.error("failed to get image for reference \(reference): \(error)")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user