You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(l1,l2): enable log levels update in runtime (#4324)
**Motivation**
<!-- Why does this pull request exist? What are its goals? -->
Sometimes we want to change the log level, primarly for debugging, and
restarting the node would break the case of study.
**Description**
<!-- A clear and concise general description of the changes this PR
introduces -->
Add a custom `admin_setLogLevel` endpoint that enables the node operator
to specify a new log filter, just like with `RUST_LOG`.
How to test:
1. Run a node (e.g. `ethrex --dev`)
2. Change the log levels:
```
curl localhost:8545 -H 'content-type: application/json' -d '{"jsonrpc":
"2.0", "id": "1", "method": "admin_setLogLevel", "params":
["ethrex_dev::block_producer=info"]}'
```
3. You should now only see `ethrex_dev::block_producer` logs
> [!WARNING]
> The `admin` namespace is currently unauthenticated and cannot be
turned off. Be aware of this in public nodes
<!-- Link to issues: Resolves#111, Resolves#222 -->
Closes#4299
0 commit comments