Documentation ¶
Index ¶
- Variables
- func WithNopCloser(writer io.Writer) io.WriteCloser
- type BaseLogger
- type Format
- type Line
- type Logger
- type NopCloser
- type Prefix
- type SimpleLogger
- type StreamLogger
- func (s *StreamLogger) AddSink(log Logger)
- func (s *StreamLogger) Children() []Logger
- func (s *StreamLogger) Debug(args ...interface{})
- func (s *StreamLogger) Debugf(format string, args ...interface{})
- func (s *StreamLogger) Done(args ...interface{})
- func (s *StreamLogger) Donef(format string, args ...interface{})
- func (s *StreamLogger) Error(args ...interface{})
- func (s *StreamLogger) ErrorStreamOnly() Logger
- func (s *StreamLogger) Errorf(format string, args ...interface{})
- func (s *StreamLogger) Fatal(args ...interface{})
- func (s *StreamLogger) Fatalf(format string, args ...interface{})
- func (s *StreamLogger) GetFormat() Format
- func (s *StreamLogger) GetLevel() logrus.Level
- func (s *StreamLogger) Info(args ...interface{})
- func (s *StreamLogger) Infof(format string, args ...interface{})
- func (s *StreamLogger) JSON(level logrus.Level, value interface{})
- func (s *StreamLogger) LogrLogSink() logr.LogSink
- func (s *StreamLogger) MakeRaw()
- func (s *StreamLogger) Print(level logrus.Level, args ...interface{})
- func (s *StreamLogger) Printf(level logrus.Level, format string, args ...interface{})
- func (s *StreamLogger) Question(params *survey.QuestionOptions) (string, error)
- func (s *StreamLogger) SetFormat(format Format)
- func (s *StreamLogger) SetLevel(level logrus.Level)
- func (s *StreamLogger) Warn(args ...interface{})
- func (s *StreamLogger) Warnf(format string, args ...interface{})
- func (s *StreamLogger) WithLevel(level logrus.Level) Logger
- func (s *StreamLogger) WithPrefix(prefix string) Logger
- func (s *StreamLogger) WithPrefixColor(prefix, color string) Logger
- func (s *StreamLogger) WithSink(log Logger) Logger
- func (s *StreamLogger) WriteString(level logrus.Level, message string)
- func (s *StreamLogger) Writer(level logrus.Level, raw bool) io.WriteCloser
Constants ¶
This section is empty.
Variables ¶
View Source
var Colors = []string{
"blue",
"blue+h",
"blue+b",
"green",
"green+h",
"green+b",
"yellow",
"yellow+h",
"yellow+b",
"magenta",
"magenta+h",
"magenta+b",
"cyan",
"cyan+h",
"cyan+b",
"white",
"white+h",
"white+b",
}
View Source
var Default = NewStdoutLogger(os.Stdin, stdout, stderr, logrus.InfoLevel)
View Source
var Discard = NewDiscardLogger(logrus.InfoLevel)
Functions ¶
func WithNopCloser ¶
func WithNopCloser(writer io.Writer) io.WriteCloser
Types ¶
type BaseLogger ¶
type BaseLogger interface { Debug(args ...interface{}) Debugf(format string, args ...interface{}) Info(args ...interface{}) Infof(format string, args ...interface{}) Done(args ...interface{}) Donef(format string, args ...interface{}) Warn(args ...interface{}) Warnf(format string, args ...interface{}) Error(args ...interface{}) Errorf(format string, args ...interface{}) Fatal(args ...interface{}) Fatalf(format string, args ...interface{}) Print(level logrus.Level, args ...interface{}) Printf(level logrus.Level, format string, args ...interface{}) SetLevel(level logrus.Level) GetLevel() logrus.Level LogrLogSink() logr.LogSink }
BaseLogger defines the common logging interface
type Logger ¶
type Logger interface { BaseLogger Question(params *survey.QuestionOptions) (string, error) ErrorStreamOnly() Logger Writer(level logrus.Level, raw bool) io.WriteCloser WriteString(level logrus.Level, message string) }
Logger defines the devspace common logging interface
func GetInstance ¶
func GetInstance() Logger
func NewDiscardLogger ¶
NewDiscardLogger returns a logger instance for the
type SimpleLogger ¶
type SimpleLogger interface {
Infof(format string, args ...interface{})
}
type StreamLogger ¶
type StreamLogger struct {
// contains filtered or unexported fields
}
func NewStdoutLogger ¶
func NewStreamLogger ¶
func NewStreamLogger(stdout, stderr io.Writer, level logrus.Level) *StreamLogger
func (*StreamLogger) AddSink ¶
func (s *StreamLogger) AddSink(log Logger)
func (*StreamLogger) Children ¶
func (s *StreamLogger) Children() []Logger
func (*StreamLogger) Debug ¶
func (s *StreamLogger) Debug(args ...interface{})
func (*StreamLogger) Debugf ¶
func (s *StreamLogger) Debugf(format string, args ...interface{})
func (*StreamLogger) Done ¶
func (s *StreamLogger) Done(args ...interface{})
func (*StreamLogger) Donef ¶
func (s *StreamLogger) Donef(format string, args ...interface{})
func (*StreamLogger) Error ¶
func (s *StreamLogger) Error(args ...interface{})
func (*StreamLogger) ErrorStreamOnly ¶
func (s *StreamLogger) ErrorStreamOnly() Logger
func (*StreamLogger) Errorf ¶
func (s *StreamLogger) Errorf(format string, args ...interface{})
func (*StreamLogger) Fatal ¶
func (s *StreamLogger) Fatal(args ...interface{})
func (*StreamLogger) Fatalf ¶
func (s *StreamLogger) Fatalf(format string, args ...interface{})
func (*StreamLogger) GetFormat ¶
func (s *StreamLogger) GetFormat() Format
func (*StreamLogger) GetLevel ¶
func (s *StreamLogger) GetLevel() logrus.Level
func (*StreamLogger) Info ¶
func (s *StreamLogger) Info(args ...interface{})
func (*StreamLogger) Infof ¶
func (s *StreamLogger) Infof(format string, args ...interface{})
func (*StreamLogger) JSON ¶
func (s *StreamLogger) JSON(level logrus.Level, value interface{})
func (*StreamLogger) LogrLogSink ¶
func (s *StreamLogger) LogrLogSink() logr.LogSink
func (*StreamLogger) MakeRaw ¶
func (s *StreamLogger) MakeRaw()
func (*StreamLogger) Print ¶
func (s *StreamLogger) Print(level logrus.Level, args ...interface{})
func (*StreamLogger) Printf ¶
func (s *StreamLogger) Printf(level logrus.Level, format string, args ...interface{})
func (*StreamLogger) Question ¶
func (s *StreamLogger) Question(params *survey.QuestionOptions) (string, error)
func (*StreamLogger) SetFormat ¶
func (s *StreamLogger) SetFormat(format Format)
func (*StreamLogger) SetLevel ¶
func (s *StreamLogger) SetLevel(level logrus.Level)
func (*StreamLogger) Warn ¶
func (s *StreamLogger) Warn(args ...interface{})
func (*StreamLogger) Warnf ¶
func (s *StreamLogger) Warnf(format string, args ...interface{})
func (*StreamLogger) WithPrefix ¶
func (s *StreamLogger) WithPrefix(prefix string) Logger
func (*StreamLogger) WithPrefixColor ¶
func (s *StreamLogger) WithPrefixColor(prefix, color string) Logger
func (*StreamLogger) WithSink ¶
func (s *StreamLogger) WithSink(log Logger) Logger
func (*StreamLogger) WriteString ¶
func (s *StreamLogger) WriteString(level logrus.Level, message string)
func (*StreamLogger) Writer ¶
func (s *StreamLogger) Writer(level logrus.Level, raw bool) io.WriteCloser
Click to show internal directories.
Click to hide internal directories.