-
Notifications
You must be signed in to change notification settings - Fork 1k
how to remove log output #848
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
Labels
Comments
Something like this. cfg := canal.NewDefaultConfig()
// disable embedded canal logs
cfg.Logger = log.NewDefault(&log.NullHandler{}) |
Thanks |
Either with this: import "github.com/siddontang/go-log/log"
...
streamHandler, _ := log.NewStreamHandler(io.Discard)
cfg.Logger = log.NewDefault(streamHandler) Or this: import "github.com/siddontang/go-log/log"
...
nullHandler, _ := log.NewNullHandler()
cfg.Logger = log.NewDefault(nullHandler) I think we need to update the docs for this. Also for me there was still some logging:
|
Note that the import that my tools add is wrong and results in:
The tools add |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
how can I remove log output from canal,i will use my own log instead of canal's default log
The text was updated successfully, but these errors were encountered: