Documentation ¶
Index ¶
Constants ¶
View Source
const (
ErrCreateLogFileFailed _e = "create log file failed"
)
Variables ¶
View Source
var Debug = noOp
View Source
var Err = noOp
View Source
var Info = noOp
View Source
var Warn = noOp
View Source
var ZapConsoleEncoder = zapcore.NewConsoleEncoder(ZapConsoleLoggerEncoderConfig)
View Source
var ZapConsoleLoggerEncoderConfig = zapcore.EncoderConfig{ MessageKey: "message", LevelKey: "level", TimeKey: "time", NameKey: "name", CallerKey: "caller", FunctionKey: "", StacktraceKey: "stacktrace", SkipLineEnding: false, LineEnding: zapcore.DefaultLineEnding, EncodeLevel: zapcore.CapitalLevelEncoder, EncodeTime: zapcore.RFC3339TimeEncoder, EncodeDuration: zapcore.StringDurationEncoder, EncodeCaller: zapcore.ShortCallerEncoder, EncodeName: zapcore.FullNameEncoder, NewReflectedEncoder: nil, ConsoleSeparator: " ", }
Functions ¶
func CreateLogFile ¶ added in v1.6.3
CreateLogFile create log file. If _filepath is empty, use default log path
func InitLegacyLogger ¶ added in v1.7.8
func LogFileCleanup ¶
func LogFileCleanup()
LogFileCleanup auto remove log files which created between staticRefTime and 7 days ago
Types ¶
type WrappedLogger ¶
func (*WrappedLogger) Printf ¶
func (this *WrappedLogger) Printf(format string, a ...interface{})
func (*WrappedLogger) Println ¶
func (this *WrappedLogger) Println(args ...interface{})
Click to show internal directories.
Click to hide internal directories.