Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2848)

Unified Diff: appengine/memlock/memlock.go

Issue 2221713002: Make memlock less verbose. (Closed) Base URL: https://chromium.googlesource.com/external/github.com/luci/luci-go@master
Patch Set: Fix process test in tumble Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tumble/process_test.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/memlock/memlock.go
diff --git a/appengine/memlock/memlock.go b/appengine/memlock/memlock.go
index 2f8a0bd5244b7b812f483fce6ed10dfc99f9a3c6..a0ab3a46fef48e977de49ed93ac57bbd28c5ccd0 100644
--- a/appengine/memlock/memlock.go
+++ b/appengine/memlock/memlock.go
@@ -71,9 +71,11 @@ func TryWithLock(ctx context.Context, key, clientID string, f func(context.Conte
return ErrEmptyClientID
}
- ctx = logging.SetField(ctx, "key", key)
- ctx = logging.SetField(ctx, "clientID", clientID)
- log := logging.Get(ctx)
+ log := logging.Get(
+ logging.SetFields(ctx, logging.Fields{
+ "key": key,
+ "clientID": clientID,
+ }))
mc := memcache.Get(ctx)
key = memlockKeyPrefix + key
« no previous file with comments | « no previous file | tumble/process_test.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698