log: allow tabs in log messages (#26630)
* log: allow tabs in log messages This fixes a regression where panic reports in RPC handlers were quoted because they contain tab characters. * Update format.go
This commit is contained in:
parent
00a9b80b5c
commit
8c18b48bf1
|
@ -492,8 +492,8 @@ func escapeString(s string) string {
|
|||
func escapeMessage(s string) string {
|
||||
needsQuoting := false
|
||||
for _, r := range s {
|
||||
// Carriage return and Line feed are ok
|
||||
if r == 0xa || r == 0xd {
|
||||
// Allow CR/LF/TAB. This is to make multi-line messages work.
|
||||
if r == '\r' || r == '\n' || r == '\t' {
|
||||
continue
|
||||
}
|
||||
// We quote everything below <space> (0x20) and above~ (0x7E),
|
||||
|
|
Loading…
Reference in New Issue