rstudio / rstudio/platform-lib

Remove use of `fmt.Sprintf` of with `slog`

Open
#245 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

good first issue tech debt
Dominant language
Go
Stars
12
Forks
0
Avg merge
18h 8m
Merged PRs (30d)
10

Description

Description

fmt.Sprintf() is used in combination with calls to the slog package. This is practice is discouraged when using slog. Instead non-static values to include in the log message should be passed to the logger as key value pairs. These uses of fmt.Sprint() and slog must be removed. pkg/rscache/file.go#280 for an instance of this improper usage.

Contributor guide

No contributing guide indexed for this repository

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 with pkg/rscache/file.go around line 280, then search the repository for fmt.Sprintf or fmt.Sprint used with slog calls. Replace each identified logging use with structured key-value arguments, and verify that the improper combinations no longer remain.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.