mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-17 18:30:45 +00:00
log: fix docstring names (#28923)
This commit is contained in:
parent
966a03f297
commit
fb25ddfa57
2 changed files with 4 additions and 3 deletions
|
|
@ -192,7 +192,7 @@ func (h *GlogHandler) Handle(_ context.Context, r slog.Record) error {
|
||||||
frame, _ := fs.Next()
|
frame, _ := fs.Next()
|
||||||
|
|
||||||
for _, rule := range h.patterns {
|
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
|
h.siteCache[r.PC], lvl, ok = rule.level, rule.level, true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ package log
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io"
|
"io"
|
||||||
"math/big"
|
"math/big"
|
||||||
|
|
@ -77,7 +78,7 @@ func benchmarkLogger(b *testing.B, l Logger) {
|
||||||
tt = time.Now()
|
tt = time.Now()
|
||||||
bigint = big.NewInt(100)
|
bigint = big.NewInt(100)
|
||||||
nilbig *big.Int
|
nilbig *big.Int
|
||||||
err = fmt.Errorf("Oh nooes it's crap")
|
err = errors.New("Oh nooes it's crap")
|
||||||
)
|
)
|
||||||
b.ReportAllocs()
|
b.ReportAllocs()
|
||||||
b.ResetTimer()
|
b.ResetTimer()
|
||||||
|
|
@ -106,7 +107,7 @@ func TestLoggerOutput(t *testing.T) {
|
||||||
tt = time.Time{}
|
tt = time.Time{}
|
||||||
bigint = big.NewInt(100)
|
bigint = big.NewInt(100)
|
||||||
nilbig *big.Int
|
nilbig *big.Int
|
||||||
err = fmt.Errorf("Oh nooes it's crap")
|
err = errors.New("Oh nooes it's crap")
|
||||||
smallUint = uint256.NewInt(500_000)
|
smallUint = uint256.NewInt(500_000)
|
||||||
bigUint = &uint256.Int{0xff, 0xff, 0xff, 0xff}
|
bigUint = &uint256.Int{0xff, 0xff, 0xff, 0xff}
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue