go-pulse/eth/downloader
jwasinger 28e7371701
all: replace log15 with slog (#28187)
This PR replaces Geth's logger package (a fork of [log15](https://github.com/inconshreveable/log15)) with an implementation using slog, a logging library included as part of the Go standard library as of Go1.21.

Main changes are as follows:
* removes any log handlers that were unused in the Geth codebase.
* Json, logfmt, and terminal formatters are now slog handlers.
* Verbosity level constants are changed to match slog constant values.  Internal translation is done to make this opaque to the user and backwards compatible with existing `--verbosity` and `--vmodule` options.
* `--log.backtraceat` and `--log.debug` are removed.

The external-facing API is largely the same as the existing Geth logger.  Logger method signatures remain unchanged.

A small semantic difference is that a `Handler` can only be set once per `Logger` and not changed dynamically.  This just means that a new logger must be instantiated every time the handler of the root logger is changed.

----
For users of the `go-ethereum/log` module. If you were using this module for your own project, you will need to change the initialization. If you previously did 
```golang
log.Root().SetHandler(log.LvlFilterHandler(log.LvlInfo, log.StreamHandler(os.Stderr, log.TerminalFormat(true))))
```
You now instead need to do 
```golang
log.SetDefault(log.NewLogger(log.NewTerminalHandlerWithLevel(os.Stderr, log.LevelInfo, true)))
```
See more about reasoning here: https://github.com/ethereum/go-ethereum/issues/28558#issuecomment-1820606613
2023-11-29 08:33:50 +01:00
..
api.go all: fix some typos (#25551) 2022-08-19 09:00:21 +03:00
beacondevsync.go cmd, eth: switch the dev synctarget to hash from block (#28209) 2023-09-29 22:11:15 +03:00
beaconsync.go eth/downloader: use atomic types (#27030) 2023-04-03 22:48:10 +03:00
downloader_test.go cmd/devp2p, eth: drop eth/66 (#28239) 2023-10-03 15:03:19 +03:00
downloader.go cmd, eth: switch the dev synctarget to hash from block (#28209) 2023-09-29 22:11:15 +03:00
events.go cmd,eth: 16400 Add an option to stop geth once in sync. WIP for light mode (#17321) 2019-01-30 08:40:36 +01:00
fetchers_concurrent_bodies.go cmd/devp2p, eth: drop eth/66 (#28239) 2023-10-03 15:03:19 +03:00
fetchers_concurrent_headers.go cmd/devp2p, eth: drop eth/66 (#28239) 2023-10-03 15:03:19 +03:00
fetchers_concurrent_receipts.go cmd/devp2p, eth: drop eth/66 (#28239) 2023-10-03 15:03:19 +03:00
fetchers_concurrent.go eth/downloader: fix timeout resurrection panic (#26652) 2023-02-09 14:56:15 +02:00
fetchers.go cmd/devp2p, eth: drop eth/66 (#28239) 2023-10-03 15:03:19 +03:00
metrics.go eth: request id dispatcher and direct req/reply APIs (#23576) 2021-11-26 13:26:03 +02:00
modes.go eth: request id dispatcher and direct req/reply APIs (#23576) 2021-11-26 13:26:03 +02:00
peer.go cmd, eth: switch the dev synctarget to hash from block (#28209) 2023-09-29 22:11:15 +03:00
queue_test.go all: replace log15 with slog (#28187) 2023-11-29 08:33:50 +01:00
queue.go core/types: support for optional blob sidecar in BlobTx (#27841) 2023-08-14 10:13:34 +02:00
resultstore.go eth/downloader: use atomic types (#27030) 2023-04-03 22:48:10 +03:00
skeleton_test.go eth/catalyst, eth/downloader: expose more sync information (#28584) 2023-11-28 08:38:30 +01:00
skeleton.go eth/catalyst, eth/downloader: expose more sync information (#28584) 2023-11-28 08:38:30 +01:00
statesync.go eth: request id dispatcher and direct req/reply APIs (#23576) 2021-11-26 13:26:03 +02:00
testchain_test.go all: activate pbss as experimental feature (#26274) 2023-08-10 22:21:36 +03:00