go-pulse/internal
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
..
blocktest internal/blocktest: add package for shared test code (#27270) 2023-07-11 14:57:02 +02:00
build build: move version-info into checksum file (#28324) 2023-10-13 15:14:48 +03:00
cmdtest all: make vendored copy of reexec (#28382) 2023-10-28 00:14:43 +02:00
debug all: replace log15 with slog (#28187) 2023-11-29 08:33:50 +01:00
ethapi eth/gasestimator: allow slight estimation error in favor of less iterations (#28618) 2023-11-28 22:31:47 +02:00
flags internal/flags: fix typo (#28133) 2023-09-17 17:02:11 +03:00
guide rpc, internal/guide: speed up tests a bit (#26193) 2022-11-17 15:30:53 +01:00
jsre internal/jsre/deps: fix typo in jsdoc (#28511) 2023-11-15 13:55:56 +01:00
reexec all: make vendored copy of reexec (#28382) 2023-10-28 00:14:43 +02:00
shutdowncheck eth, les: update unclean shutdown markers regularly (#24077) 2021-12-17 15:18:51 +01:00
syncx core: improve shutdown synchronization in BlockChain (#22853) 2021-10-07 15:47:50 +02:00
testlog all: replace log15 with slog (#28187) 2023-11-29 08:33:50 +01:00
utesting all: replace uses of ioutil with io and os (#24869) 2022-05-16 11:59:35 +02:00
version README, go.mod, event, internal/version: bump min Go to 1.19 (#26803) 2023-03-03 12:24:09 +02:00
web3ext internal/ethapi: implement eth_getBlockReceipts (#27702) 2023-08-15 14:35:48 +02:00