Documentation ¶
Index ¶
- Constants
- type Entry
- func (e Entry) Debug(args ...interface{})
- func (e Entry) DebugKVs(fields ...kv.Field)
- func (e Entry) Debugf(msg string, args ...interface{})
- func (e Entry) Error(args ...interface{})
- func (e Entry) ErrorKVs(fields ...kv.Field)
- func (e Entry) Errorf(msg string, args ...interface{})
- func (e Entry) Info(args ...interface{})
- func (e Entry) InfoKVs(fields ...kv.Field)
- func (e Entry) Infof(msg string, args ...interface{})
- func (e Entry) Panic(args ...interface{})
- func (e Entry) PanicKVs(fields ...kv.Field)
- func (e Entry) Panicf(msg string, args ...interface{})
- func (e Entry) Trace(args ...interface{})
- func (e Entry) TraceKVs(fields ...kv.Field)
- func (e Entry) Tracef(msg string, args ...interface{})
- func (e Entry) Warn(args ...interface{})
- func (e Entry) WarnKVs(fields ...kv.Field)
- func (e Entry) Warnf(msg string, args ...interface{})
- func (e Entry) With(fields ...kv.Field) Entry
- func (e Entry) Write(calldepth int)
- type LEVEL
- type Logger
- func (l *Logger) Debug(args ...interface{})
- func (l *Logger) DebugKVs(fields ...kv.Field)
- func (l *Logger) Debugf(format string, args ...interface{})
- func (l *Logger) Entry() Entry
- func (l *Logger) Error(args ...interface{})
- func (l *Logger) ErrorKVs(fields ...kv.Field)
- func (l *Logger) Errorf(format string, args ...interface{})
- func (l *Logger) Flags() uint32
- func (l *Logger) Info(args ...interface{})
- func (l *Logger) InfoKVs(fields ...kv.Field)
- func (l *Logger) Infof(format string, args ...interface{})
- func (l *Logger) Level() LEVEL
- func (l *Logger) Output(calldepth int, lvl LEVEL, msg string)
- func (l *Logger) Panic(args ...interface{})
- func (l *Logger) PanicKVs(fields ...kv.Field)
- func (l *Logger) Panicf(format string, args ...interface{})
- func (l *Logger) Print(args ...interface{})
- func (l *Logger) PrintKVs(fields ...kv.Field)
- func (l *Logger) Printf(format string, args ...interface{})
- func (l *Logger) SetFlags(flags uint32)
- func (l *Logger) SetLevel(lvl LEVEL)
- func (l *Logger) SetOutput(w io.Writer)
- func (l *Logger) Trace(args ...interface{})
- func (l *Logger) TraceKVs(fields ...kv.Field)
- func (l *Logger) Tracef(format string, args ...interface{})
- func (l *Logger) Warn(args ...interface{})
- func (l *Logger) WarnKVs(fields ...kv.Field)
- func (l *Logger) Warnf(format string, args ...interface{})
- func (l *Logger) Write(calldepth int, lvl LEVEL, write func(*byteutil.Buffer))
- func (l *Logger) Writer() io.Writer
- type Option
Constants ¶
View Source
const ( // Logger entry formatting flags. LTimestamp = uint32(1) << 1 LCaller = uint32(1) << 2 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LEVEL ¶
type LEVEL uint8
LEVEL defines a level of logging.
const ( UNSET LEVEL = 0 PANIC LEVEL = 50 ERROR LEVEL = 100 WARN LEVEL = 150 INFO LEVEL = 200 DEBUG LEVEL = 250 TRACE LEVEL = 254 ALL LEVEL = ^LEVEL(0) )
Default levels of logging.
func ParseLevel ¶
ParseLevel will attempt to decode LEVEL from given string, checking (case insensitive) against strings in Levels.
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
type Option ¶
type Option interface {
Apply(*Logger)
}
func WithCaller ¶
func WithOutput ¶
func WithSafeOutput ¶
func WithTimestamp ¶
Click to show internal directories.
Click to hide internal directories.