rstudio / rstudio/platform-lib

rslog.CapturingLogger: Messages returns its underlying message slice

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

Nobody has claimed this yet.

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

Description

The capturing logger returns its underlying message slice, allowing a caller to modify the recorded message contents.

https://github.com/rstudio/platform-lib/blob/8cb8e6209c5f0f7a3aa56ca22568035251baec08/pkg/rslog/capturing_logger.go#L129-L131

https://github.com/rstudio/platform-lib/blob/8cb8e6209c5f0f7a3aa56ca22568035251baec08/pkg/rslog/capturing_logger.go#L143-L148

Messages() should return a copy of its message slice.

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

Inspect pkg/rslog/capturing_logger.go around lines 129-131 and 143-148, focusing on Messages(). Confirm how the returned slice currently aliases recorded messages. Done means callers receive an independent message slice and cannot modify the logger's recorded contents.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
tooling
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.