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
All tests broken with Go 1.14 beta1 #1096
Comments
do we have a release date for go1.14 already ? |
go 1.14 is already released |
I assume this is related to the issue I'm seeing with go 1.14. When I set {
"file": "/Users/tschaub/go/pkg/mod/github.com/sirupsen/logrus@v1.4.2/entry.go:285",
"func": "github.com/sirupsen/logrus.(*Entry).Info"
} Perhaps Update: I see this reported in #1089 now. |
I see the problem here:
The variable ’logrusPackage‘’'v value is wrong. In addition, it works In debug mode. |
I see the problem here:
Modified to:
It works. Go 1.14 |
// getCaller retrieves the name of the first non-logrus calling function
func getCaller() *runtime.Frame {
// cache this package's fully-qualified name
callerInitOnce.Do(func() {
pcs := make([]uintptr, maximumCallerDepth)
_ = runtime.Callers(0, pcs)
// dynamic get the package name and the minimum caller depth will has a mostly compatibility of go version
for i := 0; i < maximumCallerDepth; i++ {
funcName := runtime.FuncForPC(pcs[i]).Name()
if strings.Contains(funcName, "getCaller") {
logrusPackage = getPackageName(funcName)
break;
}
}
}) |
I tested @heramerom code and it works for me, with However @heramom, I noticed you do no more:
Is it a desired behavior? |
Go 1.14 has been released! https://blog.golang.org/go1.14 |
I see we have the solution. Is someone working on a PR for this issue? |
@panshul007 I see you are primed and eager to help 😄. You are welcome to take a shot at it 🥇 👍 |
@panshul007 @chibby0ne I did it! See #1108 I built and tried my project with my fork with both 1.13 and 1.14 with no issue. |
Sorry to bother. But can we have a new tag to address this issue? |
Done! https://github.com/sirupsen/logrus/releases/tag/v1.5.0 Thank you all! |
Fedora Rawhide with Go 1.14 beta1
The text was updated successfully, but these errors were encountered: