Documentation ¶
Index ¶
- type Logger
- func (l Logger) Debug(msg ...interface{})
- func (l Logger) Debugf(template string, args ...interface{})
- func (l Logger) Error(msg ...interface{})
- func (l Logger) Errorf(template string, args ...interface{})
- func (l Logger) Fatal(msg ...interface{})
- func (l Logger) Fatalf(template string, args ...interface{})
- func (l Logger) Info(msg ...interface{})
- func (l Logger) Infof(template string, args ...interface{})
- func (l *Logger) Level(level ...levels.Type) levels.Type
- func (l *Logger) Named(name string) *Logger
- func (l *Logger) Options(funcs ...func(*Logger) *Logger) *Logger
- func (l Logger) Panic(msg ...interface{})
- func (l Logger) Panicf(template string, args ...interface{})
- func (l *Logger) Prefix(prefix ...string) string
- func (l Logger) Trace(msg ...interface{})
- func (l Logger) Tracef(template string, args ...interface{})
- func (l Logger) Warn(msg ...interface{})
- func (l Logger) Warnf(template string, args ...interface{})
- func (l *Logger) WithLevel(level levels.Type) *Logger
- func (l *Logger) WithLevelFromDebug(debug bool) *Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger struct { // Outputs used for each of the levels. Provides a writer // to write messages to io.Writer. TraceOutput io.Writer DebugOutput io.Writer InfoOutput io.Writer WarnOutput io.Writer ErrorOutput io.Writer PanicOutput io.Writer FatalOutput io.Writer // Colors used for each of the levels. Note, the Info level intentionally // does not have a color. It will use the tty default. TraceColor *color.Color DebugColor *color.Color WarnColor *color.Color ErrorColor *color.Color PanicColor *color.Color FatalColor *color.Color // contains filtered or unexported fields }
Logger provides a CLI based logger. Log messages are written to the CLI as terminal style output.
func (*Logger) WithLevelFromDebug ¶
Click to show internal directories.
Click to hide internal directories.