Skip to content

Commit

Permalink
1.修复zap中引入的包
Browse files Browse the repository at this point in the history
2.日志中的context key修改成userKey
  • Loading branch information
nildebug committed May 11, 2024
1 parent b1a1625 commit cab81b7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion log/zap.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ package log

import (
"context"
"github.com/nildebug/tools/mcontext"
"os"
"path/filepath"
"rabbitmq-demo/mcontext"

"time"

rotatelogs "github.com/lestrrat-go/file-rotatelogs"
Expand Down
2 changes: 1 addition & 1 deletion mcontext/ctx.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ package mcontext

import "context"

const CenterKey string = "key"
const CenterKey string = "userKey"

func GetCenterKey(ctx context.Context) string {
return GetStringValue(ctx, CenterKey)
Expand Down

0 comments on commit cab81b7

Please sign in to comment.