Documentation ¶
Index ¶
- func ContextWithLogger(ctx context.Context, logger *zap.Logger) context.Context
- func Ctx(ctx context.Context) *zap.Logger
- func Default() *zap.Logger
- func Logger(ctx context.Context, config *configs.Config) error
- func New(opt ...Option) (*zap.Logger, error)
- func NewFileCore(level zapcore.Level, filename string) zapcore.Core
- func RegistryInitLogger(f InitLogger)
- func SetLogger(l *zap.Logger)
- func ToLevel(level string) zapcore.Level
- type Config
- type CtxLogger
- type InitLogger
- type LogFileConfig
- type Option
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContextWithLogger ¶
func RegistryInitLogger ¶
func RegistryInitLogger(f InitLogger)
Types ¶
type Config ¶
type Config struct { Level string DisableConsole bool `yaml:"disableConsole"` LogFile LogFileConfig `yaml:"logFile"` }
type CtxLogger ¶
func NewCtxLogger ¶
type InitLogger ¶
type LogFileConfig ¶
Click to show internal directories.
Click to hide internal directories.