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

WIP: 14 debug mode #16

Closed
wants to merge 2 commits into from
Closed

WIP: 14 debug mode #16

wants to merge 2 commits into from

Conversation

snagles
Copy link
Collaborator

@snagles snagles commented Aug 8, 2018

Initial proposal for easy debug logging.

Fixes #14

@codecov-io
Copy link

codecov-io commented Aug 8, 2018

Codecov Report

Merging #16 into master will increase coverage by 3.99%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #16      +/-   ##
==========================================
+ Coverage   57.96%   61.95%   +3.99%     
==========================================
  Files           8        8              
  Lines         314      347      +33     
==========================================
+ Hits          182      215      +33     
  Misses        112      112              
  Partials       20       20
Impacted Files Coverage Δ
handler/httpclient.go 80% <100%> (+3.07%) ⬆️
util/cmp/cmp.go 95.34% <100%> (+2.36%) ⬆️

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 18591df...588ebac. Read the comment docs.

@alileza
Copy link
Member

alileza commented Aug 8, 2018

I'd say we extract logrus package to util/log, so in the future changing logging libraries won't bother the resources code etc

@alileza alileza self-requested a review August 8, 2018 22:02
@snagles
Copy link
Collaborator Author

snagles commented Aug 9, 2018

Are you suggesting creating a logger interface that will implement the required functions? Or something as simple as:

package log

import "github.com/sirupsen/logrus"

var Log *logrus.Logger

func init() {
	Log = logrus.New()
}

@alileza
Copy link
Member

alileza commented Aug 10, 2018

I think like that is enough, I just don't think that having the code tight coupled to logrus would be good, but i think like this is also fine, let's not overcomplicate simple stuff :D

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