Documentation ¶
Index ¶
- Constants
- func CapitalLevelEncoder(l zapcore.Level, enc zapcore.PrimitiveArrayEncoder)
- func Debugf(ctx context.Context, format string, v ...interface{})
- func Debugln(ctx context.Context, v ...interface{})
- func Errorf(ctx context.Context, format string, v ...interface{})
- func Fatalf(ctx context.Context, format string, v ...interface{})
- func Info(v ...interface{})
- func Infof(ctx context.Context, format string, v ...interface{})
- func Infoln(ctx context.Context, v ...interface{})
- func Init(logdir string, level string)
- func InitV1(logDir, level string, maxSize int, maxAge, maxBackups int)
- func NewLogger(filename string, maxSize, maxAge, maxBackups int, localTime, compress bool) *lumberjack.Logger
- func Panicf(ctx context.Context, format string, v ...interface{})
- func Sync()
- func TimeEncoder(t time.Time, enc zapcore.PrimitiveArrayEncoder)
- func Tracef(ctx context.Context, format string, v ...interface{})
- func Traceln(ctx context.Context, v ...interface{})
- func Warnf(ctx context.Context, format string, v ...interface{})
- func Warnln(ctx context.Context, v ...interface{})
Constants ¶
View Source
const ( LV_TRACE int = 0 LV_DEBUG int = 1 LV_INFO int = 2 LV_WARN int = 3 LV_ERROR int = 4 LV_FATAL int = 5 LV_PANIC int = 6 )
log 级别
Variables ¶
This section is empty.
Functions ¶
func CapitalLevelEncoder ¶
func CapitalLevelEncoder(l zapcore.Level, enc zapcore.PrimitiveArrayEncoder)
func NewLogger ¶
func NewLogger(filename string, maxSize, maxAge, maxBackups int, localTime, compress bool) *lumberjack.Logger
func TimeEncoder ¶
func TimeEncoder(t time.Time, enc zapcore.PrimitiveArrayEncoder)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.