fix: typo

change: do not add console output by default

feat: add GA for docs

refactor: move builtin to internal

refactor: relocate sentry sdk

feat: report events with ga

change: use http client session

fix: report GA events

change: sentry
This commit is contained in:
debugtalk
2021-11-26 15:39:17 +08:00
parent 9bc7932844
commit 45566f015c
30 changed files with 286 additions and 42 deletions
-15
View File
@@ -4,25 +4,10 @@ import (
"os"
"strings"
"github.com/getsentry/sentry-go"
"github.com/rs/zerolog"
zlog "github.com/rs/zerolog/log"
)
func init() {
// init sentry sdk
err := sentry.Init(sentry.ClientOptions{
Dsn: "https://cff5efc69b1a4325a4cf873f1e70c13a@o334324.ingest.sentry.io/6070292",
Release: VERSION,
})
if err != nil {
log.Fatal().Err(err).Msg("init sentry sdk failed!")
}
sentry.ConfigureScope(func(scope *sentry.Scope) {
scope.SetLevel(sentry.LevelError)
})
}
var log = zlog.Logger
func SetLogLevel(level string) {