zfscmd: avoid word "error" in info-level log lines (#873)
A number of tools including `lnav` do a crude string matching against the word "error". For zrepl this results in benign lines being colored red. It would be better if the logged message was something like "command ran successfully". refs - #872 --------- Co-authored-by: Christian Schwarz <me@cschwarz.com>
This commit is contained in:
@@ -23,7 +23,7 @@ type RuntimeLine struct {
|
||||
Error string
|
||||
}
|
||||
|
||||
var humanFormatterLineRE = regexp.MustCompile(`^(\[[^\]]+\]){2}\[zfs.cmd\]\[[^\]]+\]:\s+command\s+exited\s+(with|without)\s+error\s+(.+)`)
|
||||
var humanFormatterLineRE = regexp.MustCompile(`^(\[[^\]]+\]){2}\[zfs.cmd\]\[[^\]]+\]:\s+command\s+exited\s+with\s+(success|error)\s+(.+)`)
|
||||
|
||||
func parseSecs(s string) (time.Duration, error) {
|
||||
d, err := time.ParseDuration(s + "s")
|
||||
|
||||
Reference in New Issue
Block a user