Skip to content

Commit

Permalink
log: fix docstring names (ethereum#28923)
Browse files Browse the repository at this point in the history
  • Loading branch information
gzliudan committed Nov 14, 2024
1 parent 768f36e commit 16bf311
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion log/handler_glog.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ func (h *GlogHandler) Handle(_ context.Context, r slog.Record) error {
frame, _ := fs.Next()

for _, rule := range h.patterns {
if rule.pattern.MatchString(fmt.Sprintf("%+s", frame.File)) {
if rule.pattern.MatchString(fmt.Sprintf("+%s", frame.File)) {
h.siteCache[r.PC], lvl, ok = rule.level, rule.level, true
}
}
Expand Down
5 changes: 3 additions & 2 deletions log/logger_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package log

import (
"bytes"
"errors"
"fmt"
"io"
"math/big"
Expand Down Expand Up @@ -77,7 +78,7 @@ func benchmarkLogger(b *testing.B, l Logger) {
tt = time.Now()
bigint = big.NewInt(100)
nilbig *big.Int
err = fmt.Errorf("Oh nooes it's crap")
err = errors.New("Oh nooes it's crap")
)
b.ReportAllocs()
b.ResetTimer()
Expand Down Expand Up @@ -106,7 +107,7 @@ func TestLoggerOutput(t *testing.T) {
tt = time.Time{}
bigint = big.NewInt(100)
nilbig *big.Int
err = fmt.Errorf("Oh nooes it's crap")
err = errors.New("Oh nooes it's crap")
smallUint = uint256.NewInt(500_000)
bigUint = &uint256.Int{0xff, 0xff, 0xff, 0xff}
)
Expand Down

0 comments on commit 16bf311

Please sign in to comment.