Documentation
¶
Index ¶
- func NewConfig() *config
- func NewLogWriterConfig() *logWriterConfig
- type ILogWriter
- type IPrinter
- type LevelType
- type LogWriterFile
- func (w *LogWriterFile) Close() error
- func (cfg LogWriterFile) SetCacheSize(cacheSize uint32)
- func (w *LogWriterFile) SetDateFormat(dateFormat string)
- func (cfg LogWriterFile) SetDateTimeFormat(dateTimeFormat string)
- func (cfg LogWriterFile) SetSaveInterval(saveInterval time.Duration)
- func (w *LogWriterFile) Write(logEntity *logEntity) error
- type Logger
- func (log *Logger) Close()
- func (log *Logger) Debug(msg string, args ...interface{})
- func (log *Logger) Error(msg string, args ...interface{})
- func (log *Logger) Info(msg string, args ...interface{})
- func (cfg Logger) SetDateFormat(dateFormat string)
- func (cfg Logger) SetDateTimeFormat(dateTimeFormat string)
- func (cfg Logger) SetFuncSkip(skip int)
- func (cfg Logger) SetIsPrint(isPrint bool)
- func (log *Logger) SetPrintColor(printColor bool)
- func (cfg Logger) SetPrintPath(printPath bool)
- func (log *Logger) Warn(msg string, args ...interface{})
- type PlainPrinter
- type Printer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewLogWriterConfig ¶
func NewLogWriterConfig() *logWriterConfig
Types ¶
type ILogWriter ¶
type LogWriterFile ¶
type LogWriterFile struct {
// contains filtered or unexported fields
}
func NewLogWriterFile ¶
func NewLogWriterFile(level LevelType, path string, fileName string, rotate bool, config *logWriterConfig) (*LogWriterFile, error)
config - using default config when nil
func (*LogWriterFile) Close ¶
func (w *LogWriterFile) Close() error
func (LogWriterFile) SetCacheSize ¶
func (cfg LogWriterFile) SetCacheSize(cacheSize uint32)
func (*LogWriterFile) SetDateFormat ¶
func (w *LogWriterFile) SetDateFormat(dateFormat string)
func (LogWriterFile) SetDateTimeFormat ¶
func (cfg LogWriterFile) SetDateTimeFormat(dateTimeFormat string)
func (LogWriterFile) SetSaveInterval ¶
func (*LogWriterFile) Write ¶
func (w *LogWriterFile) Write(logEntity *logEntity) error
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
func NewLogger ¶
func NewLogger(level LevelType, writer ...ILogWriter) *Logger
func (Logger) SetDateFormat ¶
func (cfg Logger) SetDateFormat(dateFormat string)
func (Logger) SetDateTimeFormat ¶
func (cfg Logger) SetDateTimeFormat(dateTimeFormat string)
func (Logger) SetFuncSkip ¶
func (cfg Logger) SetFuncSkip(skip int)
func (Logger) SetIsPrint ¶
func (cfg Logger) SetIsPrint(isPrint bool)
func (*Logger) SetPrintColor ¶
func (Logger) SetPrintPath ¶
func (cfg Logger) SetPrintPath(printPath bool)
type PlainPrinter ¶
type PlainPrinter struct {
}
func NewPlainPrinter ¶
func NewPlainPrinter() *PlainPrinter
Click to show internal directories.
Click to hide internal directories.
