gemnasium / logrus-graylog-hook

Graylog hook for logrus
MIT License
87 stars 63 forks source link

Incompatible with go 1.11 package won't build when install with go get #40

Closed choestelus closed 5 years ago

choestelus commented 5 years ago

in go version 1.11 I was failed to run go get gopkg.in/gemnasium/logrus-graylog-hook.v2

the error message was

# gopkg.in/gemnasium/logrus-graylog-hook.v2
go/src/gopkg.in/gemnasium/logrus-graylog-hook.v2/error.go:52:15: cannot convert stacktrace[0] (type "github.com/pkg/errors".Frame) to type uintptr

so I fixed this line from

pc := uintptr(stacktrace[0])

into

pc := stacktrace[0].PC

and it seems to be working fine.

so I open this issue waiting it to be fixed soon. what do you think about this particular change?

robsliwi commented 5 years ago

I experience the same issue and the workaround is working for me. I would opt-in for a PR with those line-change?

TheSchemm commented 5 years ago

Yep. I am now experiencing that problem as well.

choestelus commented 5 years ago

Now I think the problem is actually from package github.com/pkg/errors have upstream update not go 1.11 and this package has no vendoring, so upstream changes break this package

but the fix seems to work nonetheless.

gravis commented 5 years ago

Thanks for your contribution! Actually, this is going to be fixed directly by https://github.com/gemnasium/logrus-graylog-hook/pull/39, which will be merged very soon.

gravis commented 5 years ago

Could you test with the new v3 version of this plugin, and reopen this issue if you encounter any problem? Thank

choestelus commented 5 years ago

v3 seems to work fine now, thank you so much! but my import path is import graylog "github.com/gemnasium/logrus-graylog-hook" not import graylog "github.com/gemnasium/logrus-graylog-hook/v3"