onflow / onflow/flow-cli

Switch Default Logging Library to slog with Logger Abstraction

Open
#1,567 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Feature
Dominant language
Go
Stars
209
Forks
87
Avg merge
1d 17h
Merged PRs (30d)
3

Description

Switch the default logging library to slog. Additionally, abstract the logger logic to seamlessly support other logging libraries like zerolog.

Steps

  1. Integration: Incorporate slog as the default logging library.
  2. Abstraction Layer: Implement a logger abstraction for compatibility with different logging libraries.
  3. Adapters: Develop adapters for specific logging libraries (e.g., zerolog) to conform to the common interface.
  4. Testing: Ensure the logger abstraction and adapters function correctly with various logging libraries.
  5. Documentation: Update project documentation to reflect the changes and guide users on configuring/logging library options.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the current logging integration and existing logger tests in the Go CLI. Trace how logging is configured and used, then define the common abstraction and adapter boundaries; done means slog is the default, alternative libraries can conform, tests cover the abstraction and adapters, and documentation explains configuration.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli, tooling
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.