Documentation
¶
Index ¶
- func BgLogger() *zap.Logger
- func LogPanic()
- func Logger(ctx context.Context) *zap.Logger
- func SetupLogger(cfg *log.Config)
- func WithField(ctx context.Context, key string, value string) context.Context
- func WithLogger(ctx context.Context, logger *zap.Logger) context.Context
- func WithModule(ctx context.Context, module string) context.Context
- func WithReqID(ctx context.Context, reqID int64) context.Context
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LogPanic ¶
func LogPanic()
LogPanic logs the panic reason and stack, then exit the process. Commonly used with a `defer`.
func SetupLogger ¶
SetupLogger is used to initialize the log with config.
func WithModule ¶
WithModule adds given module field to the logger in ctx
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.