Documentation ¶
Index ¶
- func Debug(v ...interface{})
- func DefaultFormatter(l *logger, t time.Time, level LogLevel, v ...interface{})
- func Error(v ...interface{})
- func Fatal(v ...interface{})
- func GetCaller(callLevel int) string
- func Info(v ...interface{})
- func New(out io.Writer, prefix string, level LogLevel, formatter Formatter) *logger
- func SetFormatter(formatter Formatter)
- func SetOut(out io.Writer)
- func SetPrefix(prefix string)
- func SimpleFormatter(l *logger, t time.Time, level LogLevel, v ...interface{})
- func Warn(v ...interface{})
- type Formatter
- type LogLevel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultFormatter ¶
DefaultFormatter 是默认的日志格式器,输出格式为
[I] [PREFIX] 2022-03-02 21:35:43 | xxxxx [E] [PREFIX] 2022-03-02 21:35:43 | xxxxx
func SimpleFormatter ¶ added in v1.0.5
SimpleFormatter 是简化的日志格式器,输出格式为
[I] [PREFIX] 2022-03-02 21:35:43 | xxxxx [E] [PREFIX] 2022-03-02 21:35:43 | xxxxx
Types ¶
Click to show internal directories.
Click to hide internal directories.