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

Migrate to structured logging using "go.uber.org/zap". #224

Closed
wants to merge 2 commits into from

Conversation

fancycode
Copy link
Member

No description provided.

@coveralls
Copy link

coveralls commented Apr 6, 2022

Pull Request Test Coverage Report for Build 2103082377

  • 122 of 541 (22.55%) changed or added relevant lines in 22 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+0.04%) to 43.496%

Changes Missing Coverage Covered Lines Changed/Added Lines %
natsclient_loopback.go 3 4 75.0%
proxy/proxy_client.go 0 3 0.0%
virtualsession.go 2 5 40.0%
natsclient.go 7 11 63.64%
proxy/proxy_session.go 0 5 0.0%
proxy/proxy_tokens_static.go 5 10 50.0%
backend_configuration.go 14 22 63.64%
logger.go 9 19 47.37%
proxy/proxy_tokens_etcd.go 0 11 0.0%
janus_client.go 0 13 0.0%
Files with Coverage Reduction New Missed Lines %
natsclient.go 1 51.81%
Totals Coverage Status
Change from base Build 2101125762: 0.04%
Covered Lines: 4350
Relevant Lines: 10001

💛 - Coveralls

@fancycode fancycode force-pushed the structured-logging branch 2 times, most recently from 67a4344 to 54b7ccb Compare April 6, 2022 14:19
First step: migrate standard logging calls to "zap" logger calls.
@fancycode
Copy link
Member Author

Go supports native structured logging through the slog package since 1.21, so this should be used instead of go.uber.org/zap.

For 1.20, the https://pkg.go.dev/golang.org/x/exp/slog could be used.

@fancycode fancycode closed this Nov 15, 2023
@fancycode fancycode deleted the structured-logging branch November 15, 2023 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants