Skip to content

Commit

Permalink
log: allow tabs in log messages (ethereum#26630)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
gzliudan committed Nov 14, 2024
1 parent e7b882f commit 41636fc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions log/format.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit 41636fc

Please sign in to comment.