go-ethereum/p2p/discv5
Daniel Liu 14acdf2dd1 log: remove lazy, remove unused interfaces, unexport methods (#28622)
This change

- Removes interface `log.Format`,
- Removes method `log.FormatFunc`,
- unexports `TerminalHandler.TerminalFormat` formatting methods (renamed to `TerminalHandler.format`)
- removes the notion of `log.Lazy` values

The lazy handler was useful in the old log package, since it
could defer the evaluation of costly attributes until later in the
log pipeline: thus, if the logging was done at 'Trace', we could
skip evaluation if logging only was set to 'Info'.

With the move to slog, this way of deferring evaluation is no longer
needed, since slog introduced 'Enabled': the caller can thus do
the evaluate-or-not decision at the callsite, which is much more
straight-forward than dealing with lazy reflect-based evaluation.

Also, lazy evaluation would not work with 'native' slog, as in, these
two statements would be evaluated differently:

```golang
  log.Info("foo", "my lazy", lazyObj)
  slog.Info("foo", "my lazy", lazyObj)
```
2024-11-15 10:02:42 +08:00
..
database.go new EVM Upgrade 2021-09-21 16:53:46 +05:30
database_test.go all: change format 0x%x to %#x (#25221) 2024-09-27 15:24:31 +08:00
net.go log: remove lazy, remove unused interfaces, unexport methods (#28622) 2024-11-15 10:02:42 +08:00
net_test.go new EVM Upgrade 2021-09-21 16:53:46 +05:30
node.go new EVM Upgrade 2021-09-21 16:53:46 +05:30
node_test.go fix or skip tests due to PR-136 change 2021-10-20 20:17:47 +11:00
nodeevent_string.go fix: staticcheck warning SA4003: every value of uint64 >= 0 2024-10-31 10:17:30 +08:00
ntp.go all: fix staticcheck warning S1039: unnecessary use of fmt.Sprintf 2024-10-24 12:49:37 +08:00
sim_run_test.go p2p/discv5: added new topic discovery package 2016-11-09 02:12:53 +01:00
sim_test.go new EVM Upgrade 2021-09-21 16:53:46 +05:30
sim_testmain_test.go p2p/discv5: added new topic discovery package 2016-11-09 02:12:53 +01:00
table.go new EVM Upgrade 2021-09-21 16:53:46 +05:30
table_test.go new EVM Upgrade 2021-09-21 16:53:46 +05:30
ticket.go fix panic with nil value 2024-10-31 09:01:12 +08:00
topic.go new EVM Upgrade 2021-09-21 16:53:46 +05:30
topic_test.go new EVM Upgrade 2021-09-21 16:53:46 +05:30
udp.go Revert EIP-2464 2024-08-24 02:31:27 +07:00
udp_test.go new EVM Upgrade 2021-09-21 16:53:46 +05:30