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

Refactor log statements to better use log context, reduce verbosity #651

Merged
merged 4 commits into from
Oct 3, 2023

Conversation

jgwest
Copy link
Member

@jgwest jgwest commented Sep 20, 2023

Description:

  • Move some INFO-level log statements down to DEBUG, to reduce verbosity
  • Move log text to constants to in log util package
  • Remove spaces from log constant names
  • Remove log context from log statements when that same log context is already being logged as part of the log object via log.WithValues(...)
  • Change the param order of deleteDbEntry, to move the least specific params (dbqueries, log) to the end of the function signature

Link to JIRA Story (if applicable): N/A

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 20, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jgwest

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@jgwest jgwest removed the request for review from Rizwana777 September 20, 2023 11:53
@jgwest jgwest force-pushed the log-update-sept-2023 branch from af617ad to 5e8a401 Compare September 21, 2023 19:55
@codecov
Copy link

codecov bot commented Sep 22, 2023

Codecov Report

Attention: 176 lines in your changes are missing coverage. Please review.

Comparison is base (115d38b) 61.06% compared to head (ee61abf) 61.08%.
Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #651      +/-   ##
==========================================
+ Coverage   61.06%   61.08%   +0.01%     
==========================================
  Files         100      100              
  Lines       17713    17842     +129     
==========================================
+ Hits        10817    10899      +82     
- Misses       5682     5725      +43     
- Partials     1214     1218       +4     
Files Coverage Δ
...io.redhat.com/deploymenttargetbinder_controller.go 70.58% <100.00%> (+0.20%) ⬆️
...redhat.com/deploymenttargetreclaimer_controller.go 60.11% <100.00%> (+0.94%) ⬆️
...dio.redhat.com/devsandbox_deployment_controller.go 79.31% <100.00%> (+0.43%) ⬆️
...ers/appstudio.redhat.com/environment_controller.go 72.19% <100.00%> (+0.14%) ⬆️
...rs/appstudio.redhat.com/promotionrun_controller.go 62.65% <100.00%> (+0.37%) ⬆️
...studio.redhat.com/sandboxprovisioner_controller.go 69.23% <100.00%> (+0.80%) ⬆️
...edhat.com/snapshotenvironmentbinding_controller.go 71.02% <100.00%> (+0.08%) ⬆️
backend-shared/util/log/log.go 91.17% <ø> (ø)
backend-shared/util/util.go 51.48% <ø> (ø)
...p/application_event_loop/application_event_loop.go 76.60% <100.00%> (-0.09%) ⬇️
... and 32 more

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jgwest jgwest force-pushed the log-update-sept-2023 branch from d12d8e4 to db09f6f Compare September 23, 2023 09:16
@jgwest jgwest force-pushed the log-update-sept-2023 branch from db09f6f to ee61abf Compare September 27, 2023 12:27
@jgwest
Copy link
Member Author

jgwest commented Sep 27, 2023

CI failure
/retest

@jparsai
Copy link
Contributor

jparsai commented Oct 3, 2023

LGTM @jgwest
/lgtm

@openshift-ci openshift-ci bot added the lgtm label Oct 3, 2023
@openshift-ci openshift-ci bot merged commit 1ce9612 into redhat-appstudio:main Oct 3, 2023
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants