Versions in this module Expand all Collapse all v1 v1.1.0 Jan 19, 2018 Changes in this version + type ConsoleWriter struct + func NewStderrWriter() *ConsoleWriter + func NewStdoutWriter() *ConsoleWriter + func (this *ConsoleWriter) Flush() error + func (this *ConsoleWriter) Free() + func (this *ConsoleWriter) Write(msg []byte) (int, error) v1.0.1 Nov 3, 2017 Changes in this version + func FileExist(path string) bool v1.0.0 Sep 28, 2017 Changes in this version + const ASYNC_MSG_KIND_FLUSH + const ASYNC_MSG_KIND_FREE_LOGGER + const ASYNC_MSG_KIND_FREE_ROUTINE + const ASYNC_MSG_KIND_LOG + const LEVEL_ALERT + const LEVEL_CRITICAL + const LEVEL_DEBUG + const LEVEL_EMERGENCY + const LEVEL_ERROR + const LEVEL_INFO + const LEVEL_NOTICE + const LEVEL_WARNING + const SPLIT_BY_DAY + const SPLIT_BY_HOUR + const TIME_FMT_STR_DAY + const TIME_FMT_STR_HOUR + const TIME_FMT_STR_MINUTE + const TIME_FMT_STR_MONTH + const TIME_FMT_STR_SECOND + const TIME_FMT_STR_YEAR + func AppendBytes(b []byte, elems ...[]byte) []byte + func FreeAsyncLogRoutine() + func FreeBuffers() + func InitAsyncLogRoutine(msgQueueLen int) + func InitBufferAutoFlushRoutine(maxBufNum int, timeInterval time.Duration) + func NewAsyncLogger(logger ILogger) *asyncLogger + func NewBuffer(w IWriter, bufsize int) *buffer + func NewSimpleFormater() *simpleFormater + func NewSimpleLogger(writer IWriter, globalLevel int, formater IFormater) (*simpleLogger, error) + func NewWebFormater(logId, ip []byte) *webFormater + func TimeGeneralLayout() string + type FileWithSplitWriter struct + func NewFileWriterWithSplit(path string, split int) (*FileWithSplitWriter, error) + func (this *FileWithSplitWriter) Write(msg []byte) (int, error) + type FileWriter struct + func NewFileWriter(path string) (*FileWriter, error) + func (this *FileWriter) CloseOnFree(closeOneFree bool) *FileWriter + func (this *FileWriter) Flush() error + func (this *FileWriter) Free() + func (this *FileWriter) Write(msg []byte) (int, error) + type IFormater interface + Format func(level int, msg []byte) []byte + type ILogger interface + Alert func(msg []byte) + Critical func(msg []byte) + Debug func(msg []byte) + Emergency func(msg []byte) + Error func(msg []byte) + Flush func() error + Free func() + Info func(msg []byte) + Log func(level int, msg []byte) error + Notice func(msg []byte) + Warning func(msg []byte) + type IWriter interface + Flush func() error + Free func() + type NoopFormater struct + func (this *NoopFormater) Format(level int, msg []byte) []byte + type NoopLogger struct + func (this *NoopLogger) Alert(msg []byte) + func (this *NoopLogger) Critical(msg []byte) + func (this *NoopLogger) Debug(msg []byte) + func (this *NoopLogger) Emergency(msg []byte) + func (this *NoopLogger) Error(msg []byte) + func (this *NoopLogger) Flush() error + func (this *NoopLogger) Free() + func (this *NoopLogger) Info(msg []byte) + func (this *NoopLogger) Log(level int, msg []byte) error + func (this *NoopLogger) Notice(msg []byte) + func (this *NoopLogger) Warning(msg []byte) + type NoopWriter struct + func (this *NoopWriter) Flush() error + func (this *NoopWriter) Free() + func (this *NoopWriter) Write(msg []byte) (int, error)