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

feat: suppress log package logging #3076

Merged
merged 1 commit into from
Jan 31, 2023
Merged

Conversation

krrrr38
Copy link
Contributor

@krrrr38 krrrr38 commented Jan 31, 2023

To suppress uber-go/tally logs which are not structured logs.

what

  • discard log package logging
    • it's enough to logs which are output on atlantis package.

why

uber-go/tally put non-structured logs using log package`.

uber-go/tally@c347bbf#diff-f65e5374d781f61272558959f338307fc0e51e9f59c0c75dc76d03dfd9dd2010R253

Then server output json and non-json logs.

https://github.com/runatlantis/atlantis/actions/runs/4051074308/jobs/6969044735

image

tests

  • run on local
  • begore
✘╹◡╹✘☆  go install && atlantis server --log-level info
2023/01/31 14:40:08 counters: 8, gauges: 25, histograms: 0
2023/01/31 14:40:09 counters: 8, gauges: 25, histograms: 0
{"level":"info","ts":"2023-01-31T14:40:09.032+0900","caller":"server/server.go:439","msg":"Utilizing BoltDB","json":{}}
{"level":"info","ts":"2023-01-31T14:40:09.046+0900","caller":"server/server.go:448","msg":"Repo Locking is disabled","json":{}}
...
  • after
✘╹◡╹✘☆  go install && atlantis server --log-level info
{"level":"info","ts":"2023-01-31T14:41:09.032+0900","caller":"server/server.go:439","msg":"Utilizing BoltDB","json":{}}
{"level":"info","ts":"2023-01-31T14:41:09.046+0900","caller":"server/server.go:448","msg":"Repo Locking is disabled","json":{}}
...

references

To suppress uber-go/tally logs which are not structured logs.
@krrrr38 krrrr38 requested a review from a team as a code owner January 31, 2023 05:48
@github-actions github-actions bot added the go Pull requests that update Go code label Jan 31, 2023
@nitrocode nitrocode added this to the v0.23.0 milestone Jan 31, 2023
@nitrocode
Copy link
Member

Nice!! Thank you!

@nitrocode nitrocode merged commit fdcb1ad into runatlantis:main Jan 31, 2023
@jamengual
Copy link
Contributor

jamengual commented Jan 31, 2023 via email

ijames-gc pushed a commit to gocardless/atlantis that referenced this pull request Feb 13, 2024
To suppress uber-go/tally logs which are not structured logs.
ijames-gc pushed a commit to gocardless/atlantis that referenced this pull request Feb 13, 2024
To suppress uber-go/tally logs which are not structured logs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go Pull requests that update Go code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants