Documentation
¶
Index ¶
- Constants
- func Context(ctx context.Context) *zap.Logger
- func FromLogger(ctx context.Context) *zap.Logger
- func FromStack(ctx context.Context) error
- func FromTag(ctx context.Context) string
- func FromTraceId(ctx context.Context) string
- func FromUserId(ctx context.Context) string
- func Init(ctx context.Context) (func(), error)
- func InitWithConfig(ctx context.Context) (func(), error)
- func NewLogger(ctx context.Context, logger *zap.Logger) context.Context
- func NewStack(ctx context.Context, stack error) context.Context
- func NewTag(ctx context.Context, tag string) context.Context
- func NewTraceId(ctx context.Context, traceId string) context.Context
- func NewUserId(ctx context.Context, userId string) context.Context
- type PrintLogger
Constants ¶
View Source
const ( TagKeyMain = "main" TagKeyRecovery = "recovery" TagKeyRequest = "request" TagKeyLogin = "login" TagKeyLogout = "logout" TagKeySystem = "system" TagKeyOperate = "operate" )
Variables ¶
This section is empty.
Functions ¶
func FromTraceId ¶
func FromUserId ¶
func InitWithConfig ¶
Types ¶
type PrintLogger ¶
type PrintLogger struct{}
func (*PrintLogger) Printf ¶
func (l *PrintLogger) Printf(format string, args ...any)
Click to show internal directories.
Click to hide internal directories.