Versions in this module Expand all Collapse all v1 v1.0.0 Oct 29, 2021 Changes in this version + const LogTypeFile + const LogTypeStdout + func Debug(args ...interface{}) + func Debugf(ctx context.Context, tag string, format string, args ...interface{}) + func Error(args ...interface{}) + func Errorf(ctx context.Context, tag string, format string, args ...interface{}) + func Fatal(args ...interface{}) + func Fatalf(ctx context.Context, tag string, format string, args ...interface{}) + func Info(args ...interface{}) + func Infof(ctx context.Context, tag string, format string, args ...interface{}) + func NewWriter(config *FileConfig) (zerolog.LevelWriter, error) + func Warn(args ...interface{}) + func Warnf(ctx context.Context, tag string, format string, args ...interface{}) + type DiLogHandle struct + CtxFormatFunc func(ctx context.Context) string + var Logger *DiLogHandle + func NewLoggerWithCfg(config *FileConfig) (*DiLogHandle, error) + func (zlog *DiLogHandle) Debug(args ...interface{}) + func (zlog *DiLogHandle) Debugf(ctx context.Context, tag string, format string, args ...interface{}) + func (zlog *DiLogHandle) Error(args ...interface{}) + func (zlog *DiLogHandle) Errorf(ctx context.Context, tag string, format string, args ...interface{}) + func (zlog *DiLogHandle) Fatal(args ...interface{}) + func (zlog *DiLogHandle) Fatalf(ctx context.Context, tag string, format string, args ...interface{}) + func (zlog *DiLogHandle) Info(args ...interface{}) + func (zlog *DiLogHandle) Infof(ctx context.Context, tag string, format string, args ...interface{}) + func (zlog *DiLogHandle) RegisterContextFormat(ctxFmt func(ctx context.Context) string) + func (zlog *DiLogHandle) Warn(args ...interface{}) + func (zlog *DiLogHandle) Warnf(ctx context.Context, tag string, format string, args ...interface{}) + type FileConfig struct + AutoClear bool + ClearHours int32 + ClearStep int32 + DisableLink bool + FileDir string + FilePrefix string + Level string + LogType string + Separate bool + type ICtxKey interface + GetCtxKey func() interface{} + type PubLog struct + func NewPubLogger(config *FileConfig) (*PubLog, error) + func (plog *PubLog) Public(ctx context.Context, key string, pairs map[string]interface{}) + func (plog *PubLog) PublicString(public string)