Add warnings and errors to output
This commit is contained in:
parent
1ceba25d4f
commit
27b8d5b3ee
@ -129,6 +129,8 @@ final class MetadataInfoLogger {
|
|||||||
|
|
||||||
func printMetadataScanOverview() {
|
func printMetadataScanOverview() {
|
||||||
print(" Number of pages: \(numberOfMetadataFiles)")
|
print(" Number of pages: \(numberOfMetadataFiles)")
|
||||||
|
print(" Warnings: \(warnings.count)")
|
||||||
|
print(" Errors: \(errors.count)")
|
||||||
print(" Unreadable files: \(unreadableMetadata.count)")
|
print(" Unreadable files: \(unreadableMetadata.count)")
|
||||||
print(" Unused properties: \(unusedProperties.count)")
|
print(" Unused properties: \(unusedProperties.count)")
|
||||||
print(" Invalid properties: \(invalidProperties.count)")
|
print(" Invalid properties: \(invalidProperties.count)")
|
||||||
@ -138,7 +140,9 @@ final class MetadataInfoLogger {
|
|||||||
|
|
||||||
func writeResultsToFile(in folder: URL) throws {
|
func writeResultsToFile(in folder: URL) throws {
|
||||||
let url = folder.appendingPathComponent("Metadata issues.txt")
|
let url = folder.appendingPathComponent("Metadata issues.txt")
|
||||||
var lines = ["Unreadable files:"] + unreadableMetadata.map { "\($0.source): \($0.error)" }
|
var lines = ["Errors:"] + errors.map { "\($0.source): \($0.message)" }
|
||||||
|
lines += ["Warnings:"] + warnings.map { "\($0.source): \($0.message)" }
|
||||||
|
lines += ["Unreadable files:"] + unreadableMetadata.map { "\($0.source): \($0.error)" }
|
||||||
lines += ["Unused properties:"] + unusedProperties.map { "\($0.source): \($0.name)" }
|
lines += ["Unused properties:"] + unusedProperties.map { "\($0.source): \($0.name)" }
|
||||||
lines += ["Invalid properties:"] + invalidProperties.map { "\($0.source): \($0.name) (\($0.reason))" }
|
lines += ["Invalid properties:"] + invalidProperties.map { "\($0.source): \($0.name) (\($0.reason))" }
|
||||||
lines += ["Unknown properties:"] + unknownProperties.map { "\($0.source): \($0.name)" }
|
lines += ["Unknown properties:"] + unknownProperties.map { "\($0.source): \($0.name)" }
|
||||||
|
Loading…
Reference in New Issue
Block a user