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

Remove global logger from db package #386

Merged
merged 2 commits into from
Dec 11, 2020

Conversation

gianarb
Copy link
Contributor

@gianarb gianarb commented Dec 11, 2020

I am working on a integration test suite for the db package. And the
global logger is not an ideal approach in any case.

This PR moves the logger from package level to TinkDB

@gianarb gianarb force-pushed the chore/remove-global-logger-for-db branch 2 times, most recently from 02e4b71 to b11e2ee Compare December 11, 2020 09:48
@codecov
Copy link

codecov bot commented Dec 11, 2020

Codecov Report

Merging #386 (5413130) into master (1fdd722) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #386   +/-   ##
=======================================
  Coverage   28.73%   28.73%           
=======================================
  Files          19       19           
  Lines        1385     1385           
=======================================
  Hits          398      398           
  Misses        960      960           
  Partials       27       27           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1fdd722...5413130. Read the comment docs.

I am working on a integration test suite for the db package. And the
global logger is not an ideal approach in any case.

This PR moves the logger from package level to TinkDB

Signed-off-by: Gianluca Arbezzano <[email protected]>
@gianarb gianarb force-pushed the chore/remove-global-logger-for-db branch from b11e2ee to cc8addd Compare December 11, 2020 09:52
Copy link
Contributor

@thebsdbox thebsdbox left a comment

Choose a reason for hiding this comment

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

Nice, is the plan here to share the tinkDB.Logger ?

/lgtm

@gianarb gianarb added the ready-to-merge Signal to Mergify to merge the PR. label Dec 11, 2020
@gianarb
Copy link
Contributor Author

gianarb commented Dec 11, 2020

The logger is the same or should be the same across the application, but having a global variable at the package level makes testing hard and I am currently having a look at how we can test the db pkg #387 that's where this PR comes from :)

@mergify mergify bot merged commit eb6ed72 into master Dec 11, 2020
@mergify mergify bot deleted the chore/remove-global-logger-for-db branch December 11, 2020 13:04
@mmlb mmlb removed the ready-to-merge Signal to Mergify to merge the PR. label Jan 25, 2021
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