We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When using a prefix in stdlib's logger StdLibAdapter extracts the fields from log line incorrectly.
For example, the program
package main import ( "log" "os" gokitlog "github.com/go-kit/kit/log" ) func main() { logg := log.New(gokitlog.NewStdlibAdapter(gokitlog.NewLogfmtLogger(os.Stdout)), "some prefix ", log.LstdFlags) logg.Println("log line") }
will give us the following to the stdout:
caller="some prefix 2020/11/16 22:33" msg=":04 log line"
I have a fix to support the prefix mode by adding a method Prefix(prefix string, joinPrefixToMsg bool) StdlibAdapterOption
Prefix(prefix string, joinPrefixToMsg bool) StdlibAdapterOption
The text was updated successfully, but these errors were encountered:
We would be happy to review a PR to fix this issue.
Sorry, something went wrong.
done
Fixed in #1036
No branches or pull requests
When using a prefix in stdlib's logger StdLibAdapter extracts the fields from log line incorrectly.
For example, the program
will give us the following to the stdout:
I have a fix to support the prefix mode by adding a method
Prefix(prefix string, joinPrefixToMsg bool) StdlibAdapterOption
The text was updated successfully, but these errors were encountered: