Skip to content

Commit

Permalink
Merge pull request #173 from hashicorp/v1/filter-log-CR-characters
Browse files Browse the repository at this point in the history
Filters out CR (`\r`) characters from log messages
  • Loading branch information
gdavison authored Mar 9, 2022
2 parents 26f9d4d + 8327692 commit d9108bc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,7 @@ func (l DebugLogger) Log(args ...interface{}) {
tokens = append(tokens, token)
}
}
log.Printf("[DEBUG] [aws-sdk-go] %s", strings.Join(tokens, " "))
s := strings.Join(tokens, " ")
s = strings.ReplaceAll(s, "\r", "") // Works around https://github.com/jen20/teamcity-go-test/pull/2
log.Printf("[DEBUG] [aws-sdk-go] %s", s)
}

0 comments on commit d9108bc

Please sign in to comment.