diff --git a/cmd/setup-node/commands/root.go b/cmd/setup-node/commands/root.go index 16cee9ebe3..68af690a14 100644 --- a/cmd/setup-node/commands/root.go +++ b/cmd/setup-node/commands/root.go @@ -11,7 +11,6 @@ import ( "github.com/sirupsen/logrus" "github.com/skycoin/dmsg/buildinfo" "github.com/skycoin/dmsg/cmdutil" - "github.com/skycoin/dmsg/discord" "github.com/skycoin/dmsg/metricsutil" "github.com/skycoin/skycoin/src/util/logging" "github.com/spf13/cobra" @@ -55,19 +54,6 @@ var rootCmd = &cobra.Command{ logging.AddHook(hook) } - if discordWebhookURL := discord.GetWebhookURLFromEnv(); discordWebhookURL != "" { - discordOpts := discord.GetDefaultOpts() - hook := discord.NewHook(tag, discordWebhookURL, discordOpts...) - logging.AddHook(hook) - - // Workaround for Discord logger hook. Actually, it's Info. - log.Error(discord.StartLogMessage) - defer log.Error(discord.StopLogMessage) - } else { - log.Info(discord.StartLogMessage) - defer log.Info(discord.StopLogMessage) - } - var rdr io.Reader var err error diff --git a/cmd/skywire-visor/commands/root.go b/cmd/skywire-visor/commands/root.go index c15c926996..72ab969b56 100644 --- a/cmd/skywire-visor/commands/root.go +++ b/cmd/skywire-visor/commands/root.go @@ -18,7 +18,6 @@ import ( "github.com/pkg/profile" "github.com/skycoin/dmsg/buildinfo" "github.com/skycoin/dmsg/cmdutil" - "github.com/skycoin/dmsg/discord" "github.com/skycoin/skycoin/src/util/logging" "github.com/spf13/cobra" "github.com/toqueteos/webbrowser" @@ -63,15 +62,6 @@ var rootCmd = &cobra.Command{ Run: func(_ *cobra.Command, args []string) { log := initLogger(tag, syslogAddr) - if discordWebhookURL := discord.GetWebhookURLFromEnv(); discordWebhookURL != "" { - // Workaround for Discord logger hook. Actually, it's Info. - log.Error(discord.StartLogMessage) - defer log.Error(discord.StopLogMessage) - } else { - log.Info(discord.StartLogMessage) - defer log.Info(discord.StopLogMessage) - } - delayDuration, err := time.ParseDuration(delay) if err != nil { log.WithError(err).Error("Failed to parse delay duration.") @@ -173,12 +163,6 @@ func initLogger(tag string, syslogAddr string) *logging.MasterLogger { } } - if discordWebhookURL := discord.GetWebhookURLFromEnv(); discordWebhookURL != "" { - discordOpts := discord.GetDefaultOpts() - hook := discord.NewHook(tag, discordWebhookURL, discordOpts...) - log.AddHook(hook) - } - return log } diff --git a/go.sum b/go.sum index 3e657fab0e..e3a49dc301 100644 --- a/go.sum +++ b/go.sum @@ -275,7 +275,6 @@ golang.org/x/crypto v0.0.0-20201208171446-5f87f3452ae9 h1:sYNJzB4J8toYPQTM6pAkcm golang.org/x/crypto v0.0.0-20201208171446-5f87f3452ae9/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= -golang.org/x/mod v0.2.0 h1:KU7oHjnv3XNWfa5COkzUifxZmxp1TyI7ImMXqFxLwvQ= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2 h1:Gz96sIWK3OalVv/I/qNygP42zyoKp3xptRVCWRFEBvo=