feat(logging): added uname to context logger

This commit is contained in:
Torkel Ödegaard
2016-06-07 12:20:46 +02:00
parent a02cf5beb7
commit 65aad44464
3 changed files with 2 additions and 25 deletions
+1 -1
View File
@@ -50,7 +50,7 @@ func GetContextHandler() macaron.Handler {
initContextWithAnonymousUser(ctx) {
}
ctx.Logger = log.New("context", "user", ctx.UserId, "orgId", ctx.OrgId)
ctx.Logger = log.New("context", "userId", ctx.UserId, "orgId", ctx.OrgId, "uname", ctx.Login)
ctx.Data["ctx"] = ctx
c.Map(ctx)