mirror of
https://github.com/kopia/kopia.git
synced 2026-02-24 02:18:39 -05:00
fix(cli): print errors during processing in red (#3514)
My backup had a fatal error. The end of the log looked like this: ``` Created snapshot with root k5ab05dd5a8aaf9da8a6a822abd0afabb and ID 04caa6e10f4e2866a74492a4162ea943 in 2m44s WARN Ignored 943 error(s) while snapshotting root@tower:/. ERROR Found 1 fatal error(s) while snapshotting root@tower:/. ``` Note that "WARN" is yellow and "ERROR" is red. Since I got a fatal error, I wanted to check what the fatal error was. Because "ERROR" in the lines above is red, I expected the fatal error in the kopia log to also be red, but it was yellow like the non-fatal errors. This was unexpected to me. Also note that I have lots of "! Ignored error when processing" in the kopia log because I also backup Docker containers, so right now it is not easy to find the fatal error among the non-fatal errors.
This commit is contained in:
@@ -94,7 +94,7 @@ func (p *cliProgress) Error(path string, err error, isIgnored bool) {
|
||||
p.output(warningColor, fmt.Sprintf("Ignored error when processing \"%v\": %v\n", path, err))
|
||||
} else {
|
||||
p.fatalErrorCount.Add(1)
|
||||
p.output(warningColor, fmt.Sprintf("Error when processing \"%v\": %v\n", path, err))
|
||||
p.output(errorColor, fmt.Sprintf("Error when processing \"%v\": %v\n", path, err))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user