Documentation ¶
Index ¶
- Constants
- func CrashLog(file string)
- func Debug(v ...interface{})
- func DebugEnabled() bool
- func Debugf(format string, v ...interface{})
- func DefaultStdLogger() *log.Logger
- func Error(v ...interface{})
- func ErrorEnabled() bool
- func Errorf(format string, v ...interface{})
- func Fatal(v ...interface{})
- func FatalEnabled() bool
- func Fatalf(format string, v ...interface{})
- func GetLogFile() string
- func Info(v ...interface{})
- func InfoEnabled() bool
- func Infof(format string, v ...interface{})
- func InitLog()
- func SetFlags(flags int)
- func SetHighlighting(highlighting bool)
- func SetLevel(level Level)
- func SetLevelByString(level string)
- func SetOutput(out io.Writer)
- func SetOutputByName(path string) error
- func SetRotateByDay()
- func SetRotateByHour()
- func Warn(v ...interface{})
- func WarnEnabled() bool
- func Warnf(format string, v ...interface{})
- func Warning(v ...interface{})
- func Warningf(format string, v ...interface{})
- type Cfg
- type Level
- type Logger
- func (l *Logger) Debug(v ...interface{})
- func (l *Logger) DebugEnabled() bool
- func (l *Logger) Debugf(format string, v ...interface{})
- func (l *Logger) Error(v ...interface{})
- func (l *Logger) ErrorEnabled() bool
- func (l *Logger) Errorf(format string, v ...interface{})
- func (l *Logger) Fatal(v ...interface{})
- func (l *Logger) FatalEnabled() bool
- func (l *Logger) Fatalf(format string, v ...interface{})
- func (l *Logger) GetFileName() string
- func (l *Logger) Info(v ...interface{})
- func (l *Logger) InfoEnabled() bool
- func (l *Logger) Infof(format string, v ...interface{})
- func (l *Logger) Panic(v ...interface{})
- func (l *Logger) Panicf(format string, v ...interface{})
- func (l *Logger) SetHighlighting(highlighting bool)
- func (l *Logger) SetLevel(level Level)
- func (l *Logger) SetLevelByString(level string)
- func (l *Logger) SetOutput(out io.Writer)
- func (l *Logger) SetOutputByName(path string) (err error)
- func (l *Logger) SetRotateByDay()
- func (l *Logger) SetRotateByHour()
- func (l *Logger) WarnEnabled() bool
- func (l *Logger) Warning(v ...interface{})
- func (l *Logger) Warningf(format string, v ...interface{})
- type Type
Constants ¶
View Source
const ( // Ldate flags Ldate = log.Ldate // Llongfile flags Llongfile = log.Llongfile // Lmicroseconds flags Lmicroseconds = log.Lmicroseconds // Lshortfile flags Lshortfile = log.Lshortfile // LstdFlags flags LstdFlags = log.LstdFlags // Ltime flags Ltime = log.Ltime )
View Source
const ( // LogNone log nothing LogNone = Level(0x0) // LogFatal log fatal LogFatal = LogNone | Level(fatalLevel) // LogError log error & fatal LogError = LogFatal | Level(errorLevel) // LogWarn log warn & error & fatal LogWarn = LogError | Level(warnLevel) // LogInfo log info & warn & error & fatal LogInfo = LogWarn | Level(infoLevel) // LogDebug log debug & info & warn & error & fatal LogDebug = LogInfo | Level(debugLevel) // LogAll log all LogAll = LogDebug )
Variables ¶
This section is empty.
Functions ¶
func SetLevelByString ¶
func SetLevelByString(level string)
SetLevelByString set log by string level
func SetOutputByName ¶
SetOutputByName set log file use file name
Types ¶
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
Logger is a logger
func (*Logger) GetFileName ¶
func (*Logger) SetHighlighting ¶
func (*Logger) SetLevelByString ¶
func (*Logger) SetOutputByName ¶
func (*Logger) SetRotateByDay ¶
func (l *Logger) SetRotateByDay()
func (*Logger) SetRotateByHour ¶
func (l *Logger) SetRotateByHour()
Click to show internal directories.
Click to hide internal directories.