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
according to the Opsgenie docs, there is the possibility to control the LogLevel while initializing the api client.
But sadly, the used logrus is a vendored dependency for OpsGenie.
using import "github.com/opsgenie/opsgenie-go-sdk-v2/vendor/github.com/sirupsen/logrus" fails because, it's a vendored dependency
using import "import "github.com/sirupsen/logrus" fails, because the types for LogLevel won't match.
So, there is no currently possibility to pass LogLevel to the opsgenie golang library.
I'm a golang freshman and I don't understand the concept of vendored dependencies and especially their design decisions.
But I see a few ways to proceed:
Remove logrus from the vendor directory in the opsgenie API. According to my tests, this works fine.
Hide the vendored logrus (and pass LogLevel types from the opsgenie API).
Do some weird hacking in the GOPATH mv $GOPATH/src/github.com/opsgenie/opsgenie-go-sdk-v2/vendor/github.com/sirupsen $GOPATH/src/github.com (but this can't be the solution)
? something else
What is the favorite way to solve this problem and be able to pass a LogLevel to the api client?
The text was updated successfully, but these errors were encountered:
Hi all,
according to the Opsgenie docs, there is the possibility to control the
LogLevel
while initializing the api client.But sadly, the used logrus is a vendored dependency for OpsGenie.
import "github.com/opsgenie/opsgenie-go-sdk-v2/vendor/github.com/sirupsen/logrus"
fails because, it's a vendored dependencyimport "import "github.com/sirupsen/logrus"
fails, because the types for LogLevel won't match.So, there is no currently possibility to pass
LogLevel
to the opsgenie golang library.I'm a golang freshman and I don't understand the concept of vendored dependencies and especially their design decisions.
But I see a few ways to proceed:
vendor
directory in the opsgenie API. According to my tests, this works fine.mv $GOPATH/src/github.com/opsgenie/opsgenie-go-sdk-v2/vendor/github.com/sirupsen $GOPATH/src/github.com
(but this can't be the solution)What is the favorite way to solve this problem and be able to pass a LogLevel to the api client?
The text was updated successfully, but these errors were encountered: