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 core/state/snapshot: detect and clean up dangling storage snapshot in generation (#24811) 2022-05-23 13:26:22 +03:00
conversion.go core, trie, eth: refactor stacktrie constructor (#28350) 2023-10-17 14:09:25 +02:00
difflayer_test.go all: remove deprecated uses of math.rand (#26710) 2023-02-16 14:36:58 -05:00
difflayer.go all: update golang/x/ext and fix slice sorting fallout (#27909) 2023-08-12 00:04:12 +02:00
disklayer_test.go core/rawdb: simplify TestDiskSeek to use memorydb (#25182) 2022-06-29 11:54:42 +02:00
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 all: update license headers and AUTHORS from git history (#24947) 2022-05-24 20:39:40 +02:00
holdable_iterator.go all: update license headers and AUTHORS from git history (#24947) 2022-05-24 20:39:40 +02:00
iterator_binary.go snapshot, trie: fixed typos, mostly in snapshot pkg (#22133) 2021-01-07 08:36:21 +02:00
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 all: remove deprecated uses of math.rand (#26710) 2023-02-16 14:36:58 -05:00
iterator.go core: fix typo in iterator.go (#23502) 2021-08-31 10:21:42 +02:00
journal.go core,console: replace noarg fmt.Errorf with errors.New (#27332) 2023-05-25 08:24:09 -04:00
metrics.go all: fix spelling mistakes (#25961) 2022-10-11 09:37:00 +02:00
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