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

Unified Diff: impl/memory/context.go

Issue 1498963003: Move gaelogging from luci/luci-go to luci/gae (Closed) Base URL: https://github.com/luci/gae.git@master
Patch Set: rebase Created 5 years 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 | impl/prod/context.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: impl/memory/context.go
diff --git a/impl/memory/context.go b/impl/memory/context.go
index 496a343a63d1900ad74f9aed0a2b71a2690ecc3c..39bfe092c43e711701750481680df5c9477f55e0 100644
--- a/impl/memory/context.go
+++ b/impl/memory/context.go
@@ -9,6 +9,7 @@ import (
"sync"
ds "github.com/luci/gae/service/datastore"
+ "github.com/luci/luci-go/common/logging/memlogger"
"golang.org/x/net/context"
)
@@ -93,12 +94,14 @@ func Use(c context.Context) context.Context {
return UseWithAppID(c, "dev~app")
}
-// UseWithAppID adds implementations for the following gae interfaces to the
+// UseWithAppID adds implementations for the following gae services to the
// context:
-// * gae.Datastore
-// * gae.TaskQueue
-// * gae.Memcache
-// * gae.GlobalInfo
+// * github.com/luci/gae/service/datastore
+// * github.com/luci/gae/service/taskqueue
+// * github.com/luci/gae/service/memcache
+// * github.com/luci/gae/service/info
+// * github.com/luci/gae/service/user
+// * github.com/luci/luci-go/common/logger (using memlogger)
//
// The application id wil be set to 'aid', and will not be modifiable in this
// context.
@@ -113,11 +116,12 @@ func UseWithAppID(c context.Context, aid string) context.Context {
if c.Value(memContextKey) != nil {
panic(errors.New("memory.Use: called twice on the same Context"))
}
+ c = memlogger.Use(c)
+
memctx := newMemContext(aid)
c = context.WithValue(c, memContextKey, memctx)
c = context.WithValue(c, memContextNoTxnKey, memctx)
c = context.WithValue(c, giContextKey, &globalInfoData{appid: aid})
-
return useTQ(useRDS(useMC(useGI(c, aid))))
}
« no previous file with comments | « no previous file | impl/prod/context.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698