-
Notifications
You must be signed in to change notification settings - Fork 19
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
logger: implement logger option #31
Conversation
Codecov Report
@@ Coverage Diff @@
## master #31 +/- ##
==========================================
- Coverage 77.41% 73.73% -3.69%
==========================================
Files 1 1
Lines 93 99 +6
==========================================
+ Hits 72 73 +1
- Misses 13 18 +5
Partials 8 8
Continue to review full report at Codecov.
|
Would this be enough for you @adamdecaf? You could use migrator, err := New(Migrations(migrations...), WithLogger(LoggerFunc(func(string, ...interface{}) {
// Doing nothing here would disable the output
}))) CC/ @dufcrule @glerchundi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This would work great for me, thanks for the quick change!
It also works to reformat logs into JSON, thanks! |
That's great! Did you used some 3rd party tool for json formatting? |
43e914b
to
3d96140
Compare
We use the go-kit/kit logger which has a JSON outputter. |
2884ffb
to
88a8df6
Compare
That's great. Thank you for testing it out! |
88a8df6
to
ec0aac6
Compare
Just some minor changes to the README texts. Apart from that LGTM! |
ec0aac6
to
dd66788
Compare
Thank you for the review @dufcrule !! |
Add a Logger interface, along with a LoggerFunc and a new WithLogger option. This would enable: - Customizing migrator output - Integrating a 3rd party logging tool By default, migrator will work as before, just outputting to stdout. Closes #6
dd66788
to
38a88a3
Compare
Add a Logger interface, along with a LoggerFunc and a new WithLogger option.
This would enable:
By default, migrator will work as before, just outputting to stdout.
Closes #6