Documentation
¶
Index ¶
- Constants
- func Debug(value ...interface{})
- func DebugF(format string, value ...interface{})
- func Error(value ...interface{})
- func ErrorF(format string, value ...interface{})
- func Fatal(value ...interface{})
- func FatalF(format string, value ...interface{})
- func Info(value ...interface{})
- func InfoF(format string, value ...interface{})
- func Panic(value ...interface{})
- func PanicF(format string, value ...interface{})
- func SplitPath(filePattern string) []string
- func Trace(value ...interface{})
- func TraceF(format string, value ...interface{})
- type Config
- type Entry
- type Level
- type LogFormatter
- type Logger
- func (logger *Logger) Debug(format string, args ...interface{})
- func (logger *Logger) Error(format string, args ...interface{})
- func (logger *Logger) Fatal(format string, args ...interface{})
- func (logger *Logger) Info(format string, args ...interface{})
- func (logger *Logger) Panic(format string, args ...interface{})
- func (logger *Logger) Trace(format string, args ...interface{})
- type TimeCut
- type WriteFile
Constants ¶
View Source
const ( Second timeCutFlag = iota Minute Hour Day Month Year )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
func GetDefaultConfig ¶
func GetDefaultConfig() *Config
func NewConfig ¶
func NewConfig(Formatter *LogFormatter) *Config
func (*Config) AddFileConfig ¶
AddFileConfig 按行数,按日志,按日期 切割
FilePattern 规则 ${time:2006-01-02|15-04}-${line:2000}-${size:200mb}-${level}.log
${time:2006-01-02|15-04} 按日期切割
${line:2000}按行数切割
${size:200mb}按尺寸切割
${level}日志类型
哪一个条件先达到就以那一条件为准切割
func (*Config) SetFormatter ¶
func (*Config) SetPanicPath ¶
type Entry ¶
type LogFormatter ¶
type LogFormatter struct {
TimestampFormat string
}
type WriteFile ¶
type WriteFile struct {
// contains filtered or unexported fields
}
func NewWriteFile ¶
func NewWriteFile(fileCut *cut) *WriteFile
func (*WriteFile) WriteString ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.