add logging fields

This commit is contained in:
Alex Goodman
2020-05-21 15:54:54 -04:00
parent 3e71315195
commit b7c7c5556d
10 changed files with 126 additions and 130 deletions
+6 -3
View File
@@ -1,7 +1,10 @@
package imgbom
import "github.com/anchore/imgbom/internal/logger"
import (
"github.com/anchore/imgbom/imgbom/logger"
"github.com/anchore/imgbom/internal/log"
)
func SetLogger(l logger.Logger) {
logger.SetLogger(l)
func SetLogger(logger logger.Logger) {
log.Log = logger
}
+10
View File
@@ -0,0 +1,10 @@
package logger
type Logger interface {
Errorf(format string, args ...interface{})
Infof(format string, args ...interface{})
Info(args ...interface{})
Debugf(format string, args ...interface{})
Debug(args ...interface{})
WithFields(map[string]interface{}) Logger
}