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

Unified Diff: impl/prod/logger.go

Issue 1523343002: impl/prod: Fix logging field output. (Closed) Base URL: https://github.com/luci/gae@master
Patch Set: 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: impl/prod/logger.go
diff --git a/impl/prod/logger.go b/impl/prod/logger.go
index 2b8d9712fdf2cc2fbe35811a3ffea27883ac66a2..99e6324d66ccc775e3a8cf5a662cf60437e6989c 100644
--- a/impl/prod/logger.go
+++ b/impl/prod/logger.go
@@ -16,12 +16,13 @@ import (
// appengine's log handler.
func useLogging(c context.Context) context.Context {
return logging.SetFactory(c, func(ic context.Context) logging.Logger {
- return &loggerImpl{AEContext(ic)}
+ return &loggerImpl{AEContext(ic), ic}
})
}
type loggerImpl struct {
aeCtx context.Context
+ ic context.Context
}
func (gl *loggerImpl) Debugf(format string, args ...interface{}) {
@@ -58,7 +59,7 @@ func (gl *loggerImpl) LogCall(l logging.Level, calldepth int, format string, arg
logf = log.Errorf
}
- fields := logging.GetFields(gl.aeCtx)
+ fields := logging.GetFields(gl.ic)
if len(fields) > 0 {
logf(gl.aeCtx, "%s :: %s", fmt.Sprintf(format, args...), fields.FieldString(true))
} else {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698