diff --git a/config.go b/config.go index 76a036c..496b775 100644 --- a/config.go +++ b/config.go @@ -14,7 +14,6 @@ var ( Storage string Env string Port int - Rollbar string } ) @@ -22,7 +21,6 @@ func SetupConfig() { flag.StringVar(&Config.Storage, "storage", "-", "Kyoto Cabinet storage path (e.g. "+DefaultProductionStorage+")") flag.StringVar(&Config.Env, "environment", "development", "Process environment: development or production") flag.IntVar(&Config.Port, "port", 4401, "Server HTTP port") - flag.StringVar(&Config.Rollbar, "rollbar", "", "Rollbar token") flag.Parse() if Config.Env == "production" && Config.Storage == "-" { diff --git a/logging.go b/logging.go index 3edb3cf..8a3dd77 100644 --- a/logging.go +++ b/logging.go @@ -1,7 +1,6 @@ package main import ( - "github.com/stvp/rollbar" "log" "os" "runtime" @@ -13,18 +12,11 @@ var ( func SetupLogging() { logger = log.New(os.Stdout, "", log.Ldate|log.Lmicroseconds) - rollbar.Token = Config.Rollbar - rollbar.Environment = Config.Env Log("Burlesque started in %s environment", Config.Env) Log("GOMAXPROCS is set to %d", runtime.GOMAXPROCS(-1)) Log("Storage path: %s", Config.Storage) Log("Server is running at http://127.0.0.1:%d", Config.Port) - if Config.Rollbar == "" { - Log("Rollbar is not configured and disabled") - } else { - Log("Rollbar token: %s", Config.Rollbar) - } } func Log(format string, args ...interface{}) { @@ -42,8 +34,7 @@ func Error(err error, format string, args ...interface{}) { if Config.Env == "development" { panic(err) - } - if Config.Rollbar != "" { - rollbar.Error("error", err) + } else { + logger.Printf(" ", err.Error()) } } diff --git a/main.go b/main.go index 44853f5..e2a1b19 100644 --- a/main.go +++ b/main.go @@ -2,7 +2,6 @@ package main import ( "fmt" - "github.com/stvp/rollbar" "net/http" "os" "os/signal" @@ -21,9 +20,6 @@ func HandleShutdown() { CloseStorage() - Log("Waiting for rollbar...") - rollbar.Wait() - Log("Stopped") os.Exit(0) }()