Documentation ¶
Index ¶
- func LoggerTypeToString(t LoggerType) string
- type LogLevel
- type Logger
- func (l *Logger) Clone() log.Logger
- func (l *Logger) Debug(a ...interface{})
- func (l *Logger) Debugf(format string, a ...interface{})
- func (l *Logger) Error(a ...interface{})
- func (l *Logger) Errorf(format string, a ...interface{})
- func (l *Logger) Fatal(a ...interface{})
- func (l *Logger) Fatalf(format string, a ...interface{})
- func (l *Logger) Info(a ...interface{})
- func (l *Logger) Infof(format string, a ...interface{})
- func (l *Logger) Level() string
- func (l *Logger) Output() io.Writer
- func (l *Logger) SetLevel(level LogLevel)
- func (l *Logger) SetOutput(w io.Writer)
- func (l *Logger) Trace(a ...interface{})
- func (l *Logger) Tracef(format string, a ...interface{})
- func (l *Logger) Warn(a ...interface{})
- func (l *Logger) Warnf(format string, a ...interface{})
- func (l *Logger) Warning(a ...interface{})
- func (l *Logger) Warningf(format string, a ...interface{})
- type LoggerType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoggerTypeToString ¶
func LoggerTypeToString(t LoggerType) string
Types ¶
type LogLevel ¶
type LogLevel uint
LogLevel controls what log statements are activated for a given logger
func LogLevelFromString ¶
type Logger ¶
type Logger struct { ExitOnFatal bool // contains filtered or unexported fields }
Logger maintains a set of logging functions and has a log level that can be modified dynamically
func NewLogger ¶
func NewLogger(out io.Writer, cs *iostreams.ColorScheme) *Logger
NewLogger creates a new logger Default level is INFO
type LoggerType ¶
type LoggerType uint
LoggerType controls how log statements are output
const ( QUIET LoggerType = iota BASIC FANCY JSON )
Logger types
func LoggerTypeFromString ¶
func LoggerTypeFromString(name string) LoggerType
Click to show internal directories.
Click to hide internal directories.