Documentation
¶
Index ¶
- func CtxDebug(ctx context.Context, msg string, args ...any)
- func CtxError(ctx context.Context, msg string, args ...any)
- func CtxInfo(ctx context.Context, msg string, args ...any)
- func CtxWarn(ctx context.Context, msg string, args ...any)
- func Debug(msg string, args ...any)
- func Debugf(format string, args ...any)
- func Error(msg string, args ...any)
- func Errorf(format string, args ...any)
- func FromContext(ctx context.Context) *slog.Logger
- func Info(msg string, args ...any)
- func Infof(format string, args ...any)
- func Init(c *config.LogConfig)
- func Warn(msg string, args ...any)
- func Warnf(format string, args ...any)
- func WithContext(ctx context.Context, args ...any) context.Context
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromContext ¶
FromContext 从 context 中获取 logger 如果 context 中没有,则返回全局默认 logger
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.