Skip to content

Replace all loggers with package level slog#3050

Open
masih wants to merge 14 commits intomainfrom
masih/slog-stage-3
Open

Replace all loggers with package level slog#3050
masih wants to merge 14 commits intomainfrom
masih/slog-stage-3

Conversation

@masih
Copy link
Collaborator

@masih masih commented Mar 11, 2026

Remove all references of per struct logger instantiation, in favour of singular package level loggers.

Remove now redundant logger interfaces and utilities across modules.

Breaking changes to logging configuration:

--log-format flag is deprecated. Log format is now configured exclusively via the SEI_LOG_FORMAT environment variable (values: "json", "text"). seilog captures the format once at process startup and shares a single handler across all loggers, avoiding an allocation per logger instantiation. Changing format at runtime is not supported by design.

--log-level flag still works but its priority has changed. The resolution order is now:

  1. --log-level CLI flag (highest)
  2. SEI_LOG_LEVEL env var
  3. config.toml log_level setting (lowest)

Per-module level syntax ("consensus:debug,*:info") is no longer accepted by the CLI flag or env var; use seilog.SetLevel() with glob patterns ("tendermint/internal/consensus") instead. A follow up PR will introduce log level change at runtime via seid cli command.

Default log format changed from "plain" to "json" in DefaultBaseConfig. Operators relying on the previous plain-text
default must set SEI_LOG_FORMAT=text explicitly.

masih added 3 commits March 11, 2026 10:48
Remove all references of per struct logger instantiation, in favour of
singual package level loggers.

Remove now redundant logger interfaces and utilities across modules.
# Conflicts:
#	sei-cosmos/storev2/rootmulti/store.go
#	sei-db/state_db/bench/wrappers/db_implementations.go
#	sei-db/state_db/sc/composite/store_test.go
#	sei-db/state_db/sc/flatkv/lthash_correctness_test.go
#	sei-db/state_db/sc/flatkv/snapshot.go
#	sei-db/state_db/sc/flatkv/snapshot_test.go
#	sei-db/state_db/sc/flatkv/store.go
#	sei-db/state_db/sc/flatkv/store_test.go
#	sei-db/state_db/sc/flatkv/store_write_test.go
@github-actions
Copy link

github-actions bot commented Mar 11, 2026

The latest Buf updates on your PR. Results from workflow Buf / buf (pull_request).

BuildFormatLintBreakingUpdated (UTC)
✅ passed✅ passed✅ passed✅ passedMar 11, 2026, 4:20 PM

@codecov
Copy link

codecov bot commented Mar 11, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 58.35%. Comparing base (30f8b0a) to head (0fc7a18).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3050      +/-   ##
==========================================
- Coverage   58.36%   58.35%   -0.01%     
==========================================
  Files        2079     2078       -1     
  Lines      171899   170821    -1078     
==========================================
- Hits       100321    99677     -644     
+ Misses      62637    62217     -420     
+ Partials     8941     8927      -14     
Flag Coverage Δ
sei-db 70.41% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
app/abci.go 65.89% <ø> (+0.50%) ⬆️
app/ante/cosmos_checktx.go 35.98% <ø> (+0.39%) ⬆️
app/ante/evm_checktx.go 34.04% <ø> (+0.28%) ⬆️
app/antedecorators/gasless.go 85.48% <ø> (+1.35%) ⬆️
app/app.go 71.45% <ø> (+0.85%) ⬆️
app/apptesting/test_suite.go 24.13% <ø> (-2.53%) ⬇️
app/benchmark.go 48.00% <ø> (+3.17%) ⬆️
app/benchmark/benchmark.go 55.55% <ø> (-4.45%) ⬇️
app/benchmark/generator.go 47.98% <ø> (+1.94%) ⬆️
app/benchmark/logger.go 93.10% <ø> (-0.23%) ⬇️
... and 164 more

... and 28 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@masih masih marked this pull request as ready for review March 11, 2026 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants