remove sentry and move to slog
This commit is contained in:
parent
a20bc22ab1
commit
5d2b8f39d9
18 changed files with 134 additions and 232 deletions
|
@ -6,36 +6,18 @@ import (
|
|||
"github.com/disgoorg/disgo/bot"
|
||||
"github.com/disgoorg/disgo/cache"
|
||||
"github.com/disgoorg/disgo/gateway"
|
||||
"github.com/getsentry/sentry-go"
|
||||
"grow.rievo.dev/discordBots/cmd/welcomebot/config"
|
||||
"grow.rievo.dev/discordBots/cmd/welcomebot/event"
|
||||
"log"
|
||||
"os"
|
||||
"os/signal"
|
||||
"syscall"
|
||||
"time"
|
||||
)
|
||||
|
||||
// sentry
|
||||
var release string
|
||||
|
||||
func main() {
|
||||
|
||||
err := sentry.Init(sentry.ClientOptions{
|
||||
// Either set your DSN here or set the SENTRY_DSN environment variable.
|
||||
//Dsn: "",
|
||||
// Set TracesSampleRate to 1.0 to capture 100%
|
||||
// of transactions for performance monitoring.
|
||||
// We recommend adjusting this value in production,
|
||||
TracesSampleRate: 1.0,
|
||||
Release: release,
|
||||
})
|
||||
if err != nil {
|
||||
log.Fatalf("sentry.Init: %s", err)
|
||||
}
|
||||
// Flush buffered events before the program terminates.
|
||||
defer sentry.Flush(2 * time.Second)
|
||||
|
||||
log.Printf("INFO: starting welcomebot...")
|
||||
log.Printf("INFO: disgo version: %v", disgo.Version)
|
||||
|
||||
|
@ -94,11 +76,7 @@ func main() {
|
|||
log.Fatal("couldn't find needed role")
|
||||
}
|
||||
|
||||
log.Printf("INFO: welcomebot is now running. Press CTRL-C to exit.")
|
||||
sentry.ConfigureScope(func(scope *sentry.Scope) {
|
||||
scope.SetLevel(sentry.LevelDebug)
|
||||
sentry.CaptureMessage("DEBUG: welcomebot started")
|
||||
})
|
||||
log.Printf("INFO: welcomebot (%v) is now running. Press CTRL-C to exit.", release)
|
||||
|
||||
s := make(chan os.Signal, 1)
|
||||
signal.Notify(s, syscall.SIGINT, syscall.SIGTERM, os.Interrupt)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue