diff --git a/go.mod b/go.mod index 9e9aecfa20..a3dee8acbb 100644 --- a/go.mod +++ b/go.mod @@ -5,9 +5,9 @@ require ( github.com/BurntSushi/toml v0.3.1 github.com/OneOfOne/xxhash v1.2.8 github.com/dgrijalva/jwt-go v3.2.0+incompatible - github.com/edgexfoundry/go-mod-bootstrap v0.0.64 + github.com/edgexfoundry/go-mod-bootstrap v0.0.65 github.com/edgexfoundry/go-mod-configuration v0.0.8 - github.com/edgexfoundry/go-mod-core-contracts v0.1.131 + github.com/edgexfoundry/go-mod-core-contracts v0.1.135 github.com/edgexfoundry/go-mod-messaging v0.1.28 github.com/edgexfoundry/go-mod-registry v0.1.27 github.com/edgexfoundry/go-mod-secrets v0.0.29 diff --git a/internal/core/metadata/operators/device/notify_test.go b/internal/core/metadata/operators/device/notify_test.go index 1d8408fc66..4e0a0da418 100644 --- a/internal/core/metadata/operators/device/notify_test.go +++ b/internal/core/metadata/operators/device/notify_test.go @@ -140,6 +140,11 @@ func (lc mockNotifyLogger) SetLogLevel(_ string) error { return nil } +// LogLevel returns the current log level setting +func (lc mockNotifyLogger) LogLevel() string { + return "" +} + // Info simulates logging an entry at the INFO severity level func (lc mockNotifyLogger) Info(_ string, _ ...interface{}) { } @@ -163,3 +168,27 @@ func (lc mockNotifyLogger) Trace(_ string, _ ...interface{}) { // Warn simulates logging an entry at the WARN severity level func (lc mockNotifyLogger) Warn(_ string, _ ...interface{}) { } + +// Infof simulates logging an formatted message at the INFO severity level +func (lc mockNotifyLogger) Infof(_ string, _ ...interface{}) { +} + +// Debugf simulates logging an formatted message at the DEBUG severity level +func (lc mockNotifyLogger) Debugf(_ string, _ ...interface{}) { +} + +// Errorf simulates logging an formatted message at the ERROR severity level +func (lc mockNotifyLogger) Errorf(msg string, _ ...interface{}) { + if !lc.expectError { + lc.t.Error(msg) + lc.t.Fail() + } +} + +// Tracef simulates logging an formatted message at the TRACE severity level +func (lc mockNotifyLogger) Tracef(_ string, _ ...interface{}) { +} + +// Warnf simulates logging an formatted message at the WARN severity level +func (lc mockNotifyLogger) Warnf(_ string, _ ...interface{}) { +} diff --git a/internal/security/config/main.go b/internal/security/config/main.go index e8ee5a1b4e..3f2f60ec45 100644 --- a/internal/security/config/main.go +++ b/internal/security/config/main.go @@ -10,11 +10,13 @@ import ( "context" "os" + "github.com/edgexfoundry/go-mod-core-contracts/clients/logger" + "github.com/edgexfoundry/edgex-go/internal" "github.com/edgexfoundry/edgex-go/internal/security/config/command" "github.com/edgexfoundry/edgex-go/internal/security/proxy/config" "github.com/edgexfoundry/edgex-go/internal/security/proxy/container" - "github.com/edgexfoundry/go-mod-core-contracts/clients/logger" + "github.com/edgexfoundry/go-mod-core-contracts/models" "github.com/edgexfoundry/go-mod-bootstrap/bootstrap" @@ -36,7 +38,7 @@ func Main(ctx context.Context, cancel context.CancelFunc) int { f := command.NewCommonFlags() f.Parse(os.Args[1:]) - lc := logger.NewClientStdOut(securitySecretsConfigServiceKey, false, models.ErrorLog) + lc := logger.NewClient(securitySecretsConfigServiceKey, models.ErrorLog) configuration := &config.ConfigurationStruct{} dic := di.NewContainer(di.ServiceConstructorMap{ container.ConfigurationName: func(get di.Get) interface{} {