Skip to content

Commit

Permalink
escape % in app log
Browse files Browse the repository at this point in the history
if app log output has '%', the console output will be something like: %!E(MISSING)4%!B(MISSING)8%!A(MISSING)
  • Loading branch information
yangxikun committed Aug 29, 2017
1 parent 0b5cef6 commit 6d83ad2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion runner/logger.go
Expand Up @@ -35,7 +35,7 @@ func fatal(err error) {
type appLogWriter struct{}

func (a appLogWriter) Write(p []byte) (n int, err error) {
appLog(string(p))
appLog(strings.Replace(string(p), "%", "%%", -1))

return len(p), nil
}

0 comments on commit 6d83ad2

Please sign in to comment.