-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Leveled log #321
Leveled log #321
Conversation
…ts corresponding log level
Hey @Lz-Gustavo, thank you so much for this contribution!
We have been discussing about replacing the usage of |
I'm sorry, I've forgot about test_files on the first push. Now they're all running smoothly. About Sprintf usage, I first though about using hclog.Fmt() with it's own key/value pairs, but that would result in some small modifications on the logging output string. I tried to preserve the same standard string format. |
Perfect, thank you very much! |
Thank you very much for your contribution @Lz-Gustavo ! This is a much needed boost to observability! |
Trying to fix some observability issues #272 , #320
This PR excludes support to a generic user-defined log implementing sdt Logger interface, to support hashicorp's hclog Logger interface. Allowing both the easy configuration of a desired level restriction to Config struct, like bellow:
config := raft.DefaultConfig( ) config.LogLevel = "WARN" raft, err := raft.NewRaft( config, ... )
And the configuration of an implemented hclog.Logger interface.