Skip to content

Commit a0fffba

Browse files
modify webhooks package to not use logging package functions (#469)
1 parent e1656cf commit a0fffba

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
66

77
## [Unreleased]
88

9+
## [v1.8.1]
10+
- change webhooks package to not use `logging` functions [#469](https://github.com/xmidt-org/webpa-common/pull/469)
11+
912
## [v1.8.0]
1013
- upgrade wrp-go version to v3.0.1 for subpackages convey and device [#460](https://github.com/xmidt-org/webpa-common/pull/460)
1114
- Increase reliability of travis unit tests by refactoring racy testLogger [#462](https://github.com/xmidt-org/webpa-common/pull/462)

webhook/aws/sns.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import (
1212
"time"
1313

1414
"github.com/go-kit/kit/log"
15+
"github.com/go-kit/kit/log/level"
1516
"github.com/gorilla/mux"
1617
"github.com/miekg/dns"
1718
"github.com/spf13/viper"
@@ -168,8 +169,8 @@ func (ss *SNSServer) Initialize(rtr *mux.Router, selfUrl *url.URL, soaProvider s
168169
logger = logging.DefaultLogger()
169170
}
170171

171-
ss.errorLog = logging.Error(logger)
172-
ss.debugLog = logging.Debug(logger)
172+
ss.errorLog = log.WithPrefix(logger, level.Key(), level.ErrorValue())
173+
ss.debugLog = log.WithPrefix(logger, level.Key(), level.DebugValue())
173174

174175
ss.metrics = ApplyMetricsData(registry)
175176
ss.snsNotificationReceivedChan = ss.SNSNotificationReceivedInit()

0 commit comments

Comments
 (0)