Documentation
¶
Index ¶
- Constants
- Variables
- func AllLevelsFilter(lvl Level) bool
- func CsvTextFormatter(r *Record) string
- func Debug(message string)
- func DebugLevelFilter(lvl Level) bool
- func Debugf(format string, args ...interface{})
- func Debugv(args ...interface{})
- func DefaultColorTextFormatterForHuman(r *Record) string
- func DefaultTextFormatter(r *Record) string
- func DefaultTextFormatterForHuman(r *Record) string
- func DisabledFilter(lvl Level) bool
- func Error(message string)
- func ErrorLevelFilter(lvl Level) bool
- func Errorf(format string, args ...interface{})
- func Errorv(args ...interface{})
- func Flush()
- func GetFilter(logger *Logger) func(Level) bool
- func GetFlags(logger *Logger) loggerFlags
- func HashColoredText(name string) string
- func Info(message string)
- func InfoLevelFilter(lvl Level) bool
- func Infof(format string, args ...interface{})
- func Infov(args ...interface{})
- func IsValidLevel(lvl Level) bool
- func Log(lvl Level, message string)
- func LogFilterForLevel(lvl Level) func(Level) bool
- func LogLevelColoredMsg(lvl Level, msg string) string
- func LogLevelString(lvl Level) string
- func Logf(lvl Level, format string, args ...interface{})
- func Logv(lvl Level, args ...interface{})
- func PaddedString(s string, width int) string
- func SetFilter(logger *Logger, filter func(Level) bool)
- func SetFlags(logger *Logger, flags loggerFlags)
- func SetLogger(l *Logger)
- func Trace(message string)
- func TraceLevelFilter(lvl Level) bool
- func Tracef(format string, args ...interface{})
- func Tracev(args ...interface{})
- func Warn(message string)
- func WarnLevelFilter(lvl Level) bool
- func Warnf(format string, args ...interface{})
- func Warnv(args ...interface{})
- type ColorStringer
- type Field
- type Level
- type LeveledSink
- type LogWriter
- type Logger
- func (l *Logger) Debug(message string)
- func (l *Logger) Debugf(format string, args ...interface{})
- func (l *Logger) Debugv(args ...interface{})
- func (l *Logger) Error(message string)
- func (l *Logger) Errorf(format string, args ...interface{})
- func (l *Logger) Errorv(args ...interface{})
- func (l *Logger) Flush()
- func (l *Logger) Info(message string)
- func (l *Logger) Infof(format string, args ...interface{})
- func (l *Logger) Infov(args ...interface{})
- func (l *Logger) IsEnabled(lvl Level) bool
- func (l *Logger) Log(lvl Level, message string)
- func (l *Logger) Logf(lvl Level, format string, args ...interface{})
- func (l *Logger) Logv(lvl Level, args ...interface{})
- func (l *Logger) Trace(message string)
- func (l *Logger) Tracef(format string, args ...interface{})
- func (l *Logger) Tracev(args ...interface{})
- func (l *Logger) Warn(message string)
- func (l *Logger) Warnf(format string, args ...interface{})
- func (l *Logger) Warnv(args ...interface{})
- func (l *Logger) With(name string, value interface{}) *Logger
- func (l *Logger) WithFields(fields []Field) *Logger
- type Metadata
- type MultiSink
- type NopSink
- type Record
- type Sink
- type StreamSink
- type SyncedSink
Constants ¶
View Source
const ( DisabledLevel Level = 0 ErrorLevel = 1 << (iota - 1) WarnLevel InfoLevel DebugLevel TraceLevel )
Power of 2
View Source
const ( FlagTime = 1 << (iota - 1) FlagSrcHint )
Variables ¶
View Source
var (
NopLogger = newNopLogger()
)
Functions ¶
func AllLevelsFilter ¶
func CsvTextFormatter ¶
func DebugLevelFilter ¶
func DefaultTextFormatter ¶
func DisabledFilter ¶
func ErrorLevelFilter ¶
func HashColoredText ¶
func InfoLevelFilter ¶
func IsValidLevel ¶
func LogFilterForLevel ¶
func LogLevelColoredMsg ¶
func LogLevelString ¶
func PaddedString ¶
func TraceLevelFilter ¶
func WarnLevelFilter ¶
Types ¶
type ColorStringer ¶
type ColorStringer interface {
ColorString() string
}
type LeveledSink ¶
func (*LeveledSink) Flush ¶
func (l *LeveledSink) Flush()
func (*LeveledSink) Log ¶
func (l *LeveledSink) Log(r *Record)
type Logger ¶
type Logger struct {
// contains filtered or unexported fields
}
func WithFields ¶
func (*Logger) WithFields ¶
type StreamSink ¶
func (*StreamSink) Flush ¶
func (s *StreamSink) Flush()
func (*StreamSink) Log ¶
func (s *StreamSink) Log(r *Record)
type SyncedSink ¶
type SyncedSink struct { Inner Sink // contains filtered or unexported fields }
func (*SyncedSink) Flush ¶
func (s *SyncedSink) Flush()
func (*SyncedSink) Log ¶
func (s *SyncedSink) Log(r *Record)
Click to show internal directories.
Click to hide internal directories.