You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I believe NewGraylogHook should return error and/or nil *GraylogHook or as a backward-compatible solution *GraylogHook should provide method to get initialization error.
The text was updated successfully, but these errors were encountered:
Good catch!
I have turned this in my head several times: I don't think workaround solutions are better than returning the error in the initializer. As this is a breaking API change, we'll use gopkg.in to bump to 3.0 (that doesn't really make sense, but unless we have a real package manager in go, that's the way to go).
Thanks, I'll publish the new version in a few minutes.
In case of unreachable graylog server
GraylogHook.gelfLogger
is silently initialized to nil: graylog_hook.go#L46 -> graylog_hook.go#L60Then program crashes with nil pointer dereference on sending entry: graylog_hook.go#L146 -> graylog_hook.go#L208
I believe
NewGraylogHook
should return error and/or nil*GraylogHook
or as a backward-compatible solution*GraylogHook
should provide method to get initialization error.The text was updated successfully, but these errors were encountered: