Versions in this module Expand all Collapse all v0 v0.0.2 Oct 8, 2023 v0.0.1 Aug 21, 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 Must(err error) + type Encoder string + const ConsoleEncoder + const JsonEncoder + func (e *Encoder) IsConsole() bool + func (e *Encoder) IsJson() bool + func (e *Encoder) String() string + type KzLog struct + func New(opts ...Options) *KzLog + func (l *KzLog) AddHooks(hooks ...func(entry zapcore.Entry) error) + func (l *KzLog) Debug(args ...interface{}) + func (l *KzLog) Debugf(template string, args ...interface{}) + func (l *KzLog) Debugw(msg string, keysAndValues ...interface{}) + func (l *KzLog) Error(args ...interface{}) + func (l *KzLog) Errorf(template string, args ...interface{}) + func (l *KzLog) Errorw(msg string, keysAndValues ...interface{}) + func (l *KzLog) Fatal(args ...interface{}) + func (l *KzLog) Fatalf(template string, args ...interface{}) + func (l *KzLog) Fatalw(msg string, keysAndValues ...interface{}) + func (l *KzLog) Info(args ...interface{}) + func (l *KzLog) Infof(template string, args ...interface{}) + func (l *KzLog) Infow(msg string, keysAndValues ...interface{}) + func (l *KzLog) LevelEnablerFunc(level zapcore.Level) LevelEnablerFunc + func (l *KzLog) Log(level Level, template string, fmtArgs []interface{}, context []interface{}) + func (l *KzLog) Options() *Option + func (l *KzLog) SetLevel(lv kiko_logger.Level) + func (l *KzLog) StdLog() *std.Logger + func (l *KzLog) Sync() error + func (l *KzLog) Warn(args ...interface{}) + func (l *KzLog) Warnf(template string, args ...interface{}) + func (l *KzLog) Warnw(msg string, keysAndValues ...interface{}) + func (l *KzLog) WithCallDepth(callDepth int) kiko_logger.Logger + func (l *KzLog) WithContext(ctx context.Context) kiko_logger.Logger + func (l *KzLog) WithError(err error) kiko_logger.Logger + func (l *KzLog) WithFields(fields map[string]interface{}) kiko_logger.Logger + 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 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