Versions in this module Expand all Collapse all v0 v0.0.2 Jun 9, 2023 v0.0.1 Jun 6, 2023 Changes in this version + const DailyRolling + const DebugLevel + const ErrorLevel + const FatalLevel + const HourlyRolling + const InfoLevel + const MinutelyRolling + const MonthlyRolling + const SecondlyRolling + const WarnLevel + var ErrBuffer = errors.New("buffer exceeds the limit") + var ErrClosedRollingFile = errors.New("rolling file is closed") + var ErrLogPathNotSet = errors.New("log path must be set") + func CopyFields(fields map[string]interface{}) []zap.Field + func Debug(args ...interface{}) + func Debugf(format string, args ...interface{}) + func Debugw(msg string, keysAndValues ...interface{}) + func Error(args ...interface{}) + func Errorf(format string, args ...interface{}) + func Errorw(msg string, keysAndValues ...interface{}) + func Fatal(args ...interface{}) + func Fatalf(format string, args ...interface{}) + func Fatalw(msg string, keysAndValues ...interface{}) + func Info(args ...interface{}) + func Infof(format string, args ...interface{}) + func Infow(msg string, keysAndValues ...interface{}) + func InitLogger(log Logger) + func Must(err error) + func SetLevel(lv Level) + func Sync() error + func Warn(args ...interface{}) + func Warnf(format string, args ...interface{}) + func Warnw(msg string, keysAndValues ...interface{}) + type Default struct + func New(opts ...Options) *Default + func (l *Default) Debug(args ...interface{}) + func (l *Default) Debugf(template string, args ...interface{}) + func (l *Default) Debugw(msg string, keysAndValues ...interface{}) + func (l *Default) Error(args ...interface{}) + func (l *Default) Errorf(template string, args ...interface{}) + func (l *Default) Errorw(msg string, keysAndValues ...interface{}) + func (l *Default) Fatal(args ...interface{}) + func (l *Default) Fatalf(template string, args ...interface{}) + func (l *Default) Fatalw(msg string, keysAndValues ...interface{}) + func (l *Default) Info(args ...interface{}) + func (l *Default) Infof(template string, args ...interface{}) + func (l *Default) Infow(msg string, keysAndValues ...interface{}) + func (l *Default) LevelEnablerFunc(level zapcore.Level) LevelEnablerFunc + func (l *Default) Log(level Level, template string, fmtArgs []interface{}, context []interface{}) + func (l *Default) Options() Option + func (l *Default) SetLevel(lv Level) + func (l *Default) StdLog() *std.Logger + func (l *Default) Sync() error + func (l *Default) Warn(args ...interface{}) + func (l *Default) Warnf(template string, args ...interface{}) + func (l *Default) Warnw(msg string, keysAndValues ...interface{}) + func (l *Default) WithCallDepth(callDepth int) Logger + func (l *Default) WithContext(ctx context.Context) Logger + func (l *Default) WithError(err error) Logger + func (l *Default) WithFields(fields map[string]interface{}) Logger + type Encoder string + const ConsoleEncoder + const JsonEncoder + func (e *Encoder) IsConsole() bool + func (e *Encoder) IsJson() bool + func (e *Encoder) String() string + type Level int8 + func ParseLevel(s string) Level + func (l Level) Enabled(lvl Level) bool + func (l Level) String() string + type LevelEnablerFunc func(zapcore.Level) bool + func (f LevelEnablerFunc) Enabled(lvl zapcore.Level) bool + type Logger interface + Debug func(args ...interface{}) + Debugf func(template string, args ...interface{}) + Debugw func(msg string, keysAndValues ...interface{}) + Error func(args ...interface{}) + Errorf func(template string, args ...interface{}) + Errorw func(msg string, keysAndValues ...interface{}) + Fatal func(args ...interface{}) + Fatalf func(template string, args ...interface{}) + Fatalw func(msg string, keysAndValues ...interface{}) + Info func(args ...interface{}) + Infof func(template string, args ...interface{}) + Infow func(msg string, keysAndValues ...interface{}) + Log func(level Level, template string, fmtArgs []interface{}, context []interface{}) + Options func() Option + SetLevel func(lv Level) + StdLog func() *std.Logger + Sync func() error + Warn func(args ...interface{}) + Warnf func(template string, args ...interface{}) + Warnw func(msg string, keysAndValues ...interface{}) + WithCallDepth func(callDepth int) Logger + WithContext func(ctx context.Context) Logger + WithError func(err error) Logger + WithFields func(fields map[string]interface{}) Logger + var DefaultLogger Logger = New() + func InitDefaultLogger() Logger + func WithContext(ctx context.Context) Logger + type Option struct + func (o Option) Level() Level + type Options func(o *Option) + func WithBasePath(path string) Options + func WithCallerSkip(skip int) Options + func WithConsole(enableConsole bool) Options + func WithDisableDisk(disableDisk bool) Options + func WithEncoder(encoder Encoder) Options + func WithEncoderConfig(encoderConfig zapcore.EncoderConfig) Options + func WithFields(fields map[string]interface{}) Options + func WithFilename(filename string) Options + func WithLevel(lv Level) Options + func WithNamespace(name string) Options + type RollingFile struct + func NewRollingFile(basePath string, rolling RollingFormat) (*RollingFile, error) + func (r *RollingFile) Close() error + func (r *RollingFile) SetRolling(fmt RollingFormat) + func (r *RollingFile) Sync() error + func (r *RollingFile) Write(b []byte) (n int, err error) + type RollingFormat string