Documentation ¶
Index ¶
- Variables
- func EnableGroupSession(logger interface{}) func()
- type Colors
- type GroupedLogger
- type Logger
- type LogrAdapter
- type Option
- func CheckMarkCharacter(m rune) Option
- func Color(colors Colors) Option
- func Err(w io.Writer) Option
- func ErrorMarkCharacter(m rune) Option
- func Grouppable() Option
- func Out(w io.Writer) Option
- func SeparatorCharacter(m rune) Option
- func Truncate() Option
- func WithName(name string) Option
- func WithTime(format string) Option
- type SpinnerLogSink
- func (log *SpinnerLogSink) AddName(name string)
- func (log *SpinnerLogSink) AddValues(keyAndValues []interface{})
- func (log *SpinnerLogSink) Copy() *SpinnerLogSink
- func (log *SpinnerLogSink) Enabled(level int) bool
- func (log *SpinnerLogSink) Error(e error, msg string, keysAndValues ...interface{})
- func (log *SpinnerLogSink) GetGrouppable() bool
- func (log *SpinnerLogSink) GetShowTime() bool
- func (log *SpinnerLogSink) GetSpinner() *spinner.Spinner
- func (log *SpinnerLogSink) GetValues() []interface{}
- func (log *SpinnerLogSink) Grouped(state bool)
- func (log *SpinnerLogSink) Info(level int, msg string, keysAndValues ...interface{})
- func (log *SpinnerLogSink) Init(_ logr.RuntimeInfo)
- func (log *SpinnerLogSink) InitSpinner()
- func (log *SpinnerLogSink) SetDisableColor(disableColor bool)
- func (log *SpinnerLogSink) SetGrouppable(state bool)
- func (log *SpinnerLogSink) SetOptions(options ...Option)
- func (log *SpinnerLogSink) SetShowTime(time bool)
- func (log *SpinnerLogSink) ShowTime(f bool) *SpinnerLogSink
- func (log *SpinnerLogSink) StopSpinner()
- func (log *SpinnerLogSink) WithName(name string) logr.LogSink
- func (log *SpinnerLogSink) WithValues(keysAndValues ...interface{}) logr.LogSink
Constants ¶
This section is empty.
Variables ¶
View Source
var ( GlobalLogLevel = 1 Log = New() )
Functions ¶
func EnableGroupSession ¶
func EnableGroupSession(logger interface{}) func()
Types ¶
type GroupedLogger ¶
type GroupedLogger interface {
Grouped(state bool)
}
type Logger ¶
type Logger interface { Enabled() bool Info(msg string, keysAndValues ...interface{}) Error(err error, msg string, keysAndValues ...interface{}) V(level int) Logger WithValues(keysAndValues ...interface{}) Logger WithName(name string) Logger GetLogrLogger() logr.Logger }
func NewWithLogrLogger ¶
type LogrAdapter ¶
func (*LogrAdapter) GetLogrLogger ¶
func (log *LogrAdapter) GetLogrLogger() logr.Logger
func (*LogrAdapter) V ¶
func (log *LogrAdapter) V(level int) Logger
func (*LogrAdapter) WithName ¶
func (log *LogrAdapter) WithName(name string) Logger
func (*LogrAdapter) WithValues ¶
func (log *LogrAdapter) WithValues(keysAndValues ...interface{}) Logger
type Option ¶
type Option func(*SpinnerLogSink)
func CheckMarkCharacter ¶
func ErrorMarkCharacter ¶
func Grouppable ¶
func Grouppable() Option
func SeparatorCharacter ¶
type SpinnerLogSink ¶
type SpinnerLogSink struct {
// contains filtered or unexported fields
}
func NewSpinnerLogSink ¶
func NewSpinnerLogSink(options ...Option) *SpinnerLogSink
func (*SpinnerLogSink) AddName ¶
func (log *SpinnerLogSink) AddName(name string)
func (*SpinnerLogSink) AddValues ¶
func (log *SpinnerLogSink) AddValues(keyAndValues []interface{})
func (*SpinnerLogSink) Copy ¶
func (log *SpinnerLogSink) Copy() *SpinnerLogSink
func (*SpinnerLogSink) Enabled ¶
func (log *SpinnerLogSink) Enabled(level int) bool
Enabled implements logr.LogSink interface
func (*SpinnerLogSink) Error ¶
func (log *SpinnerLogSink) Error(e error, msg string, keysAndValues ...interface{})
Error implements logr.LogSink interface
func (*SpinnerLogSink) GetGrouppable ¶
func (log *SpinnerLogSink) GetGrouppable() bool
func (*SpinnerLogSink) GetShowTime ¶
func (log *SpinnerLogSink) GetShowTime() bool
func (*SpinnerLogSink) GetSpinner ¶
func (log *SpinnerLogSink) GetSpinner() *spinner.Spinner
func (*SpinnerLogSink) GetValues ¶
func (log *SpinnerLogSink) GetValues() []interface{}
func (*SpinnerLogSink) Grouped ¶
func (log *SpinnerLogSink) Grouped(state bool)
func (*SpinnerLogSink) Info ¶
func (log *SpinnerLogSink) Info(level int, msg string, keysAndValues ...interface{})
Info implements logr.LogSink interface
func (*SpinnerLogSink) Init ¶
func (log *SpinnerLogSink) Init(_ logr.RuntimeInfo)
func (*SpinnerLogSink) InitSpinner ¶
func (log *SpinnerLogSink) InitSpinner()
func (*SpinnerLogSink) SetDisableColor ¶
func (log *SpinnerLogSink) SetDisableColor(disableColor bool)
func (*SpinnerLogSink) SetGrouppable ¶
func (log *SpinnerLogSink) SetGrouppable(state bool)
func (*SpinnerLogSink) SetOptions ¶
func (log *SpinnerLogSink) SetOptions(options ...Option)
func (*SpinnerLogSink) SetShowTime ¶
func (log *SpinnerLogSink) SetShowTime(time bool)
func (*SpinnerLogSink) ShowTime ¶
func (log *SpinnerLogSink) ShowTime(f bool) *SpinnerLogSink
func (*SpinnerLogSink) StopSpinner ¶
func (log *SpinnerLogSink) StopSpinner()
func (*SpinnerLogSink) WithName ¶
func (log *SpinnerLogSink) WithName(name string) logr.LogSink
WithName implements logr.LogSink interface
func (*SpinnerLogSink) WithValues ¶
func (log *SpinnerLogSink) WithValues(keysAndValues ...interface{}) logr.LogSink
WithValues implements logr.LogSink interface
Click to show internal directories.
Click to hide internal directories.