Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

logging(gitstart): migrate gitserver logging #35514

Closed
bobheadxi opened this issue May 16, 2022 · 1 comment · Fixed by #36005
Closed

logging(gitstart): migrate gitserver logging #35514

bobheadxi opened this issue May 16, 2022 · 1 comment · Fixed by #36005
Assignees
Labels
estimate/2d gitstart Contract partner

Comments

@bobheadxi
Copy link
Member

bobheadxi commented May 16, 2022

Problem statement

We are undergoing a migration to our new logging library, github.com/sourcegraph/sourcegraph/lib/log. This library has a number of significant changes that requires manual migration:

  1. Strongly typed API for adding contextual fields (using log.String, etc.)
  2. No global loggers are allowed (loggers are created with log.Scoped and then passed around to handle logging concerns)

For more details, see https://docs.sourcegraph.com/dev/how-to/add_logging .

The main existing logger usage to replace are calls to log15..

Success criteria

All ~125 occurrences of log15 calls in files that appear related to gitserver are replaced with logging calls to an appropriately scoped log.Logger instance, e.g. ones held by the parent struct:

https://sourcegraph.com/search?q=context:global+r:%5Egithub%5C.com/sourcegraph/sourcegraph%24++content:%22log15.%22+lang:go+f:gitserver&patternType=literal

For an example migration, see #35516 and #35759

Green CI builds.

Time estimate

16 hours (~2 days)

@gitstart-app
Copy link
Contributor

gitstart-app bot commented May 16, 2022

Here is the GitStart Ticket for this issue: https://app.gitstart.com/clients/sourcegraph/tickets/SG-35514

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
estimate/2d gitstart Contract partner
Projects
Development

Successfully merging a pull request may close this issue.

2 participants