From 473acc61c8392dc7ae303d91568e179c4f105a76 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Tue, 2 Jul 2019 12:12:53 +0200 Subject: add black list --- .../github.com/fluffle/goirc/logging/glog/glog.go | 32 ---------------------- .../fluffle/goirc/logging/golog/golog.go | 15 ---------- vendor/github.com/fluffle/goirc/logging/logging.go | 9 +++--- 3 files changed, 5 insertions(+), 51 deletions(-) delete mode 100644 vendor/github.com/fluffle/goirc/logging/glog/glog.go delete mode 100644 vendor/github.com/fluffle/goirc/logging/golog/golog.go (limited to 'vendor/github.com/fluffle/goirc/logging') diff --git a/vendor/github.com/fluffle/goirc/logging/glog/glog.go b/vendor/github.com/fluffle/goirc/logging/glog/glog.go deleted file mode 100644 index 40d49a0..0000000 --- a/vendor/github.com/fluffle/goirc/logging/glog/glog.go +++ /dev/null @@ -1,32 +0,0 @@ -package glog - -import ( - "fmt" - "github.com/golang/glog" - "github.com/fluffle/goirc/logging" -) - -// Simple adapter to utilise Google's GLog package with goirc. -// Just import this package alongside goirc/client and call -// glog.Init() in your main() to set things up. -type GLogger struct{} - -func (gl GLogger) Debug(f string, a ...interface{}) { - // GLog doesn't have a "Debug" level, so use V(2) instead. - if glog.V(2) { - glog.InfoDepth(3, fmt.Sprintf(f, a...)) - } -} -func (gl GLogger) Info(f string, a ...interface{}) { - glog.InfoDepth(3, fmt.Sprintf(f, a...)) -} -func (gl GLogger) Warn(f string, a ...interface{}) { - glog.WarningDepth(3, fmt.Sprintf(f, a...)) -} -func (gl GLogger) Error(f string, a ...interface{}) { - glog.ErrorDepth(3, fmt.Sprintf(f, a...)) -} - -func Init() { - logging.SetLogger(GLogger{}) -} diff --git a/vendor/github.com/fluffle/goirc/logging/golog/golog.go b/vendor/github.com/fluffle/goirc/logging/golog/golog.go deleted file mode 100644 index 5b12492..0000000 --- a/vendor/github.com/fluffle/goirc/logging/golog/golog.go +++ /dev/null @@ -1,15 +0,0 @@ -package golog - -import ( - log "github.com/fluffle/golog/logging" - "github.com/fluffle/goirc/logging" -) - -// Simple adapter to utilise my logging package with goirc. -// Just import this package alongside goirc/client and call -// golog.Init() in your main() to set things up. -func Init() { - l := log.NewFromFlags() - l.SetDepth(1) - logging.SetLogger(l) -} diff --git a/vendor/github.com/fluffle/goirc/logging/logging.go b/vendor/github.com/fluffle/goirc/logging/logging.go index bd54416..f939fce 100644 --- a/vendor/github.com/fluffle/goirc/logging/logging.go +++ b/vendor/github.com/fluffle/goirc/logging/logging.go @@ -31,13 +31,14 @@ func SetLogger(l Logger) { // A nullLogger does nothing while fulfilling Logger. type nullLogger struct{} + func (nl nullLogger) Debug(f string, a ...interface{}) {} -func (nl nullLogger) Info(f string, a ...interface{}) {} -func (nl nullLogger) Warn(f string, a ...interface{}) {} +func (nl nullLogger) Info(f string, a ...interface{}) {} +func (nl nullLogger) Warn(f string, a ...interface{}) {} func (nl nullLogger) Error(f string, a ...interface{}) {} // Shim functions so that the package can be used directly func Debug(f string, a ...interface{}) { logger.Debug(f, a...) } -func Info(f string, a ...interface{}) { logger.Info(f, a...) } -func Warn(f string, a ...interface{}) { logger.Warn(f, a...) } +func Info(f string, a ...interface{}) { logger.Info(f, a...) } +func Warn(f string, a ...interface{}) { logger.Warn(f, a...) } func Error(f string, a ...interface{}) { logger.Error(f, a...) } -- cgit v1.2.3