Documentation
¶
Index ¶
- Constants
- func Debug(data ...any)
- func Dev(data ...any)
- func Error(data ...any)
- func Fatal(data ...any)
- func Info(data ...any)
- func Init(level string) error
- func InitWith(level string, options Options) error
- func IsDebug() bool
- func IsDev() bool
- func IsError() bool
- func IsFatal() bool
- func IsInfo() bool
- func IsWarn() bool
- func Level() string
- func Sync()
- func Warn(data ...any)
- type Logger
- func (logger *Logger) Debug(data ...any)
- func (logger *Logger) Dev(data ...any)
- func (logger *Logger) Error(data ...any)
- func (logger *Logger) Fatal(data ...any)
- func (logger *Logger) Info(data ...any)
- func (logger *Logger) IsDebug() bool
- func (logger *Logger) IsDev() bool
- func (logger *Logger) IsError() bool
- func (logger *Logger) IsFatal() bool
- func (logger *Logger) IsInfo() bool
- func (logger *Logger) IsWarn() bool
- func (logger *Logger) Level() string
- func (logger *Logger) SetLevel(level string)
- func (logger *Logger) Sub(level string) (*Logger, error)
- func (logger *Logger) Sync()
- func (logger *Logger) Warn(data ...any)
- func (logger *Logger) With(fields ...zap.Field) *Logger
- type Options
Constants ¶
View Source
const DeveloperLevel zapcore.Level = -2
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
func NewWithDefaults ¶
type Options ¶
type Options struct {
EncodeLevel zapcore.LevelEncoder
EncodeCaller zapcore.CallerEncoder
EncodeDuration zapcore.DurationEncoder
EncodeTime zapcore.TimeEncoder
StackDepth int
}
func DefaultOptions ¶
func DefaultOptions() Options
Click to show internal directories.
Click to hide internal directories.