Make Logger interface more flexible

This commit is contained in:
Corey Brooks
2018-06-18 14:42:03 -07:00
parent be944ed461
commit d9e847f7ea
13 changed files with 33 additions and 32 deletions
+5 -5
View File
@@ -5,8 +5,8 @@ import (
"log"
"strconv"
"gopkg.in/go-playground/webhooks.v3"
"gopkg.in/go-playground/webhooks.v3/github"
"gopkg.in/go-playground/webhooks.v4"
"gopkg.in/go-playground/webhooks.v4/github"
)
const (
@@ -18,15 +18,15 @@ type myLogger struct {
PrintDebugs bool
}
func (l *myLogger) Info(msg string) {
func (l *myLogger) Info(msg ...interface{}) {
log.Println(msg)
}
func (l *myLogger) Error(msg string) {
func (l *myLogger) Error(msg ...interface{}) {
log.Println(msg)
}
func (l *myLogger) Debug(msg string) {
func (l *myLogger) Debug(msg ...interface{}) {
if !l.PrintDebugs {
return
}
+2 -2
View File
@@ -4,8 +4,8 @@ import (
"fmt"
"strconv"
"gopkg.in/go-playground/webhooks.v3"
"gopkg.in/go-playground/webhooks.v3/github"
"gopkg.in/go-playground/webhooks.v4"
"gopkg.in/go-playground/webhooks.v4/github"
)
const (
+2 -2
View File
@@ -4,8 +4,8 @@ import (
"fmt"
"strconv"
"gopkg.in/go-playground/webhooks.v3"
"gopkg.in/go-playground/webhooks.v3/github"
"gopkg.in/go-playground/webhooks.v4"
"gopkg.in/go-playground/webhooks.v4/github"
)
const (