Documentation ¶
Index ¶
- Constants
- func Access(traceID string, userID ...string) *logrus.Entry
- func AccessWithContext(ctx context.Context) *logrus.Entry
- func Login(traceID string, userID string) *logrus.Entry
- func LoginWithContext(ctx context.Context) *logrus.Entry
- func Middleware(allowPrefixes ...string) gin.HandlerFunc
- func Operate(traceID string, userID ...string) *logrus.Entry
- func OperateWithContext(ctx context.Context) *logrus.Entry
- func System(traceID string, userID ...string) *logrus.Entry
- func SystemWithContext(ctx context.Context) *logrus.Entry
- type HookFlusher
- type Logger
- type Option
Constants ¶
View Source
const ( FieldKeyTraceID = "trace_id" FieldKeyType = "type" FieldKeyUserID = "user_id" )
定义日志中使用的键名
Variables ¶
This section is empty.
Functions ¶
func AccessWithContext ¶
AccessWithContext 访问日志
func LoginWithContext ¶
LoginWithContext 登录(登出)日志
func OperateWithContext ¶
OperateWithContext 操作日志
Types ¶
Click to show internal directories.
Click to hide internal directories.