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

Implement logger interface on keeper. #4625

Merged
merged 4 commits into from
Jun 26, 2019

Conversation

aayushijain23
Copy link
Contributor

@aayushijain23 aayushijain23 commented Jun 25, 2019

  • Added a logger interface to the keeper for modules where it wasn't defined.
  • In the crisis module, removed the passing of the logger as a parameter in abci.go and module.go

closes: #3512


  • 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 tests

  • Updated relevant documentation (docs/)

  • Added a relevant changelog entry: clog add [section] [stanza] [message]

  • rereviewed Files changed in the github PR explorer


For Admin Use:

  • Added appropriate labels to PR (ex. wip, ready-for-review, docs)
  • Reviewers Assigned
  • Squashed all commits, uses message "Merge pull request #XYZ: [title]" (coding standards)

- Added a logger interface to the keeper for modules where it wasn't defined.
- In the crisis module, removed the passing of the logger as a parameter in abci.go and module.go
@alexanderbez alexanderbez added WIP Type: Code Hygiene General cleanup and restructuring of code to provide clarity, flexibility, and modularity. labels Jun 25, 2019
x/auth/keeper.go Outdated Show resolved Hide resolved
…ses to fail.

- Added a change log entry for the code changes.
- Implemented a better pattern for module keepers.
- Removed logger being passed as a parameter in the test files that were failing.
Copy link
Collaborator

@fedekunze fedekunze left a comment

Choose a reason for hiding this comment

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

Thanks @aayushijain23 ! I believe we need to have a discussion if every Keeper should have a Logger or not. In some of the cases presented here, it's not even being used.

x/auth/keeper.go Outdated Show resolved Hide resolved
x/bank/internal/keeper/keeper.go Outdated Show resolved Hide resolved
x/mint/internal/keeper/keeper.go Outdated Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Jun 25, 2019

Codecov Report

Merging #4625 into master will increase coverage by <.01%.
The diff coverage is 45.45%.

@@            Coverage Diff             @@
##           master    #4625      +/-   ##
==========================================
+ Coverage   54.11%   54.11%   +<.01%     
==========================================
  Files         260      260              
  Lines       16364    16373       +9     
==========================================
+ Hits         8855     8861       +6     
- Misses       6863     6866       +3     
  Partials      646      646

Copy link
Contributor

@alexanderbez alexanderbez left a comment

Choose a reason for hiding this comment

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

ACK -- great job @aayushijain23 ☕️

@alexanderbez
Copy link
Contributor

@aayushijain23 can you resolve merge conflicts please?

@alexanderbez alexanderbez merged commit c898dac into master Jun 26, 2019
@alexanderbez alexanderbez deleted the aayushijain23/3512-implement-logger-interface branch June 26, 2019 16:41
larry0x pushed a commit to larry0x/cosmos-sdk that referenced this pull request May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Code Hygiene General cleanup and restructuring of code to provide clarity, flexibility, and modularity.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement k.Logger() interface on keeper
3 participants