Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Use latest bootstrap for logging client changes #2975

Merged
merged 1 commit into from
Dec 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
29 changes: 29 additions & 0 deletions internal/core/metadata/operators/device/notify_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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{}) {
}
Expand All @@ -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{}) {
}
6 changes: 4 additions & 2 deletions internal/security/config/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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{} {
Expand Down