removed unused log

pull/496/head
hunterlong 2020-04-14 19:04:50 -07:00
parent dbdf92411f
commit 445308e558
5 changed files with 9 additions and 7 deletions

View File

@ -1,7 +1,6 @@
package notifiers package notifiers
import ( import (
"github.com/prometheus/common/log"
"github.com/statping/statping/types/failures" "github.com/statping/statping/types/failures"
"github.com/statping/statping/types/null" "github.com/statping/statping/types/null"
"github.com/statping/statping/types/services" "github.com/statping/statping/types/services"
@ -9,6 +8,8 @@ import (
"time" "time"
) )
var log = utils.Log.WithField("type", "notifier")
func InitNotifiers() { func InitNotifiers() {
Add( Add(
slacker, slacker,

View File

@ -2,12 +2,13 @@ package checkins
import ( import (
"fmt" "fmt"
"github.com/prometheus/common/log"
"github.com/statping/statping/types/failures" "github.com/statping/statping/types/failures"
"github.com/statping/statping/utils" "github.com/statping/statping/utils"
"time" "time"
) )
var log = utils.Log.WithField("type", "checkin")
// RecheckCheckinFailure will check if a Service Checkin has been reported yet // RecheckCheckinFailure will check if a Service Checkin has been reported yet
func (c *Checkin) RecheckCheckinFailure(guard chan struct{}) { func (c *Checkin) RecheckCheckinFailure(guard chan struct{}) {
between := utils.Now().Sub(utils.Now()).Seconds() between := utils.Now().Sub(utils.Now()).Seconds()

View File

@ -2,7 +2,6 @@ package users
import ( import (
"fmt" "fmt"
"github.com/prometheus/common/log"
"golang.org/x/crypto/bcrypt" "golang.org/x/crypto/bcrypt"
"time" "time"
) )

View File

@ -1,12 +1,14 @@
package users package users
import ( import (
"github.com/prometheus/common/log"
"github.com/statping/statping/database" "github.com/statping/statping/database"
"github.com/statping/statping/utils" "github.com/statping/statping/utils"
) )
var db database.Database var (
db database.Database
log = utils.Log.WithField("type", "user")
)
func SetDB(database database.Database) { func SetDB(database database.Database) {
db = database.Model(&User{}) db = database.Model(&User{})

View File

@ -4,7 +4,6 @@ import (
"fmt" "fmt"
"github.com/fatih/structs" "github.com/fatih/structs"
"github.com/getsentry/sentry-go" "github.com/getsentry/sentry-go"
"github.com/prometheus/common/log"
Logger "github.com/sirupsen/logrus" Logger "github.com/sirupsen/logrus"
"github.com/statping/statping/types/null" "github.com/statping/statping/types/null"
"gopkg.in/natefinch/lumberjack.v2" "gopkg.in/natefinch/lumberjack.v2"
@ -47,7 +46,7 @@ func SentryInit(v *string, allow bool) {
Environment: goEnv, Environment: goEnv,
Release: version, Release: version,
}); err != nil { }); err != nil {
log.Errorln(err) Log.Errorln(err)
} }
Log.Infoln("Error Reporting initiated, thank you!") Log.Infoln("Error Reporting initiated, thank you!")
} }