plugeth/core/state/snapshot
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
..
context.go
conversion.go core, trie, eth: refactor stacktrie constructor (#28350) 2023-10-17 14:09:25 +02:00
difflayer_test.go
difflayer.go all: update golang/x/ext and fix slice sorting fallout (#27909) 2023-08-12 00:04:12 +02:00
disklayer_test.go
disklayer.go core/state, tests: fix memory leak via fastcache (#28387) 2023-10-20 13:35:49 +02:00
generate_test.go all: replace log15 with slog (#28187) 2023-11-29 08:33:50 +01:00
generate.go core/state/snapshot: print correct error from trie iterator (#28560) 2023-11-21 10:47:37 +08:00
holdable_iterator_test.go
holdable_iterator.go
iterator_binary.go
iterator_fast.go all: update golang/x/ext and fix slice sorting fallout (#27909) 2023-08-12 00:04:12 +02:00
iterator_test.go
iterator.go
journal.go core,console: replace noarg fmt.Errorf with errors.New (#27332) 2023-05-25 08:24:09 -04:00
metrics.go
snapshot_test.go core/state/snapshot, core/types, eth: move account definition to type (#27323) 2023-06-06 11:17:39 +03:00
snapshot.go core/state, tests: fix memory leak via fastcache (#28387) 2023-10-20 13:35:49 +02:00
utils.go core/state/snapshot, core/types, eth: move account definition to type (#27323) 2023-06-06 11:17:39 +03:00