Skip to content

Commit fb25ddf

Browse files
committed
log: fix docstring names (ethereum#28923)
1 parent 966a03f commit fb25ddf

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

log/handler_glog.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ func (h *GlogHandler) Handle(_ context.Context, r slog.Record) error {
192192
frame, _ := fs.Next()
193193

194194
for _, rule := range h.patterns {
195-
if rule.pattern.MatchString(fmt.Sprintf("%+s", frame.File)) {
195+
if rule.pattern.MatchString(fmt.Sprintf("+%s", frame.File)) {
196196
h.siteCache[r.PC], lvl, ok = rule.level, rule.level, true
197197
}
198198
}

log/logger_test.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package log
22

33
import (
44
"bytes"
5+
"errors"
56
"fmt"
67
"io"
78
"math/big"
@@ -77,7 +78,7 @@ func benchmarkLogger(b *testing.B, l Logger) {
7778
tt = time.Now()
7879
bigint = big.NewInt(100)
7980
nilbig *big.Int
80-
err = fmt.Errorf("Oh nooes it's crap")
81+
err = errors.New("Oh nooes it's crap")
8182
)
8283
b.ReportAllocs()
8384
b.ResetTimer()
@@ -106,7 +107,7 @@ func TestLoggerOutput(t *testing.T) {
106107
tt = time.Time{}
107108
bigint = big.NewInt(100)
108109
nilbig *big.Int
109-
err = fmt.Errorf("Oh nooes it's crap")
110+
err = errors.New("Oh nooes it's crap")
110111
smallUint = uint256.NewInt(500_000)
111112
bigUint = &uint256.Int{0xff, 0xff, 0xff, 0xff}
112113
)

0 commit comments

Comments
 (0)