Documentation ¶
Index ¶
Constants ¶
View Source
const LevelKey = "level"
LevelKey is logger level key.
Variables ¶
View Source
var ( // DefaultCaller is a Valuer that returns the file and line. DefaultCaller = Caller(3) // DefaultTimestamp is a Valuer that returns the current wallclock time. DefaultTimestamp = Timestamp("2006-01-02.15:04:05.000000") )
Functions ¶
func NewJSONColorable ¶
NewJSONColorable returns new instance of Writer which handles escape sequence from File.
Types ¶
type BaseLog ¶
type BaseLog interface { Logger Info(a ...interface{}) Warn(a ...interface{}) Error(a ...interface{}) }
type Level ¶
type Level int8
Level is a logger level.
func ParseLevel ¶
ParseLevel parses a level string into a logger Level value.
type Log ¶
type Log interface { BaseLog Debug(a ...interface{}) Debugf(format string, a ...interface{}) Debugw(keyvals ...interface{}) Infof(format string, a ...interface{}) Infow(keyvals ...interface{}) Warnf(format string, a ...interface{}) Warnw(keyvals ...interface{}) Errorf(format string, a ...interface{}) Errorw(keyvals ...interface{}) Fatal(a ...interface{}) Fatalf(format string, a ...interface{}) Fatalw(keyvals ...interface{}) }
Click to show internal directories.
Click to hide internal directories.