marstr / marstr/baronial

Switch from logrus to slog

Open
#124 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
13
Forks
0
PR merge metrics
No merged PRs in 30d

Description

I know that logrus isn't being as developed as actively as it once was, and I was just reading [this article](https://www.dash0.com/guides/golang-logging-libraries#1-slog) that was a pretty compelling case to switch to the newer API in the standard library, [log/slog](https://pkg.go.dev/log/slog).

I don't think I ever really did a good job with tuning the logging behavior anyway. Right now a lot of noise gets piped to stderr and shown to the user when it doesn't really make sense.

My wish list would be to:

1. Add a global argument that controls the level of logging.
1. Add a global argument that controls where logs are written to.
1. Do a comprehensive review of what is logged here in `baronial`.
1. Adopt slog in https://github.com/marstr/envelopes as well so that debug information can be easily captured and shared here.

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 inventorying current logging in baronial and reviewing log/slog's level and output APIs. Then inspect the related logging in envelopes; done means the migration, global level and destination controls, logging review, and cross-project adoption are all addressed.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.