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

Fix logger ignoring configuration #510

Merged
merged 3 commits into from
Sep 30, 2021
Merged

Conversation

dwedul-figure
Copy link
Contributor

…that the configured values can be used as needed.

Description

The logger was being created before the configuration was being loaded. That made it so that the configured log_level and log_format were being ignored and only flags and defaults were used for them.

This fix moves the logger creation and setting until later, once the configs have been loaded.


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer
  • Review Codecov Report in the comment section below once CI passes

@codecov
Copy link

codecov bot commented Sep 29, 2021

Codecov Report

Merging #510 (f14a654) into main (afdf78e) will increase coverage by 0.04%.
The diff coverage is 55.55%.

❗ Current head f14a654 differs from pull request most recent head 941df0d. Consider uploading reports for the commit 941df0d to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##             main     #510      +/-   ##
==========================================
+ Coverage   54.68%   54.72%   +0.04%     
==========================================
  Files         149      149              
  Lines       19211    19214       +3     
==========================================
+ Hits        10505    10515      +10     
+ Misses       7884     7876       -8     
- Partials      822      823       +1     
Impacted Files Coverage Δ
cmd/provenanced/config/interceptor.go 0.00% <0.00%> (ø)
cmd/provenanced/config/manager.go 39.38% <58.82%> (+0.81%) ⬆️

iramiller
iramiller previously approved these changes Sep 29, 2021
Copy link
Member

@iramiller iramiller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

arnabmitra
arnabmitra previously approved these changes Sep 29, 2021
@dwedul-figure dwedul-figure merged commit 26c7496 into main Sep 30, 2021
@dwedul-figure dwedul-figure deleted the dwedul/fix-log-level-config branch September 30, 2021 15:37
dwedul-figure added a commit that referenced this pull request Sep 30, 2021
* Move logger creation to happen after the configs have been loaded so that the configured values can be used as needed.

* Add changelog line.
iramiller added a commit that referenced this pull request Sep 30, 2021
* Add 1.7.2 change log

* Update dependencies (#513)

* Update dependencies

* update unsigned tx method signature

* Fix logger ignoring configuration (#510)

* Move logger creation to happen after the configs have been loaded so that the configured values can be used as needed.

* Add changelog line.

Co-authored-by: Carlton Hanna <[email protected]>
Co-authored-by: Daniel Wedul <[email protected]>
Co-authored-by: Carlton Hanna <[email protected]>
Co-authored-by: Carlton Hanna <[email protected]>
Co-authored-by: egaxhaj-figure <[email protected]>
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.

3 participants