Update kit/log To New API

NewContext has been removed couple of weeks back.
Ref: https://github.com/go-kit/kit/releases/tag/v0.4.0
This commit is contained in:
Goutham Veeramachaneni 2017-03-19 21:03:09 +05:30
parent 303a4ec3bc
commit df7db4ac07
No known key found for this signature in database
GPG Key ID: F1C217E8E9023CAD
2 changed files with 2 additions and 2 deletions

2
db.go
View File

@ -157,7 +157,7 @@ func Open(dir string, l log.Logger, r prometheus.Registerer, opts *Options) (db
if l == nil {
l = log.NewLogfmtLogger(os.Stdout)
l = log.NewContext(l).With("ts", log.DefaultTimestampUTC, "caller", log.DefaultCaller)
l = log.With(l, "ts", log.DefaultTimestampUTC, "caller", log.DefaultCaller)
}
if opts == nil {

View File

@ -86,7 +86,7 @@ func createHeadBlock(dir string, seq int, l log.Logger, mint, maxt int64) (*head
// openHeadBlock creates a new empty head block.
func openHeadBlock(dir string, l log.Logger) (*headBlock, error) {
wal, err := OpenWAL(dir, log.NewContext(l).With("component", "wal"), 5*time.Second)
wal, err := OpenWAL(dir, log.With(l, "component", "wal"), 5*time.Second)
if err != nil {
return nil, err
}