Documentation ¶
Overview ¶
el is a Golang log lib. It's simple.
Index ¶
- Constants
- func Debug(msg string, m ...map[string]interface{})
- func Debugf(format string, args ...interface{})
- func Error(msg string, m ...map[string]interface{})
- func Errorf(format string, args ...interface{})
- func Fatal(msg string, m ...map[string]interface{})
- func Fatalf(format string, args ...interface{})
- func Info(msg string, m ...map[string]interface{})
- func Infof(format string, args ...interface{})
- func Panic(msg string, m ...map[string]interface{})
- func Panicf(format string, args ...interface{})
- func SetConf(c *Conf)
- func Warn(msg string, m ...map[string]interface{})
- func Warnf(format string, args ...interface{})
- type Conf
- type Map
Constants ¶
View Source
const ( // log level DebugL level = iota InfoL WarnL ErrorL PanicL FatalL )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Conf ¶
type Conf struct { // Prefix is the prefix of a log. Prefix string // The logs are write to these outputs. Outs []io.Writer // Value is the value, that every log will include. Value map[string]interface{} // Format is the log format. Format string // AddCaller specific should the log add caller. AddCaller bool // CallerSkip specific the runtime.Caller(skip) skip number. CallerSkip int // AddTime specific should the log add time. AddTime bool // TimeFormat specific the log's time format. // "unixnano" and "unix" indicates time.UnixNano() and time.Unix() TimeFormat string // NotPanic specific should the log panic after panic method. NotPanic bool // NotFatal specific should the log exit after panic method. NotFatal bool // LowestLevel specific the lowest log level. // level less than LowestLevel will not be log. LowestLevel level }
Click to show internal directories.
Click to hide internal directories.