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 ¶ added in v0.28.0
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 ¶ added in v0.28.2
type LogrAdapter ¶ added in v0.28.2
func (*LogrAdapter) GetLogrLogger ¶ added in v0.28.2
func (log *LogrAdapter) GetLogrLogger() logr.Logger
func (*LogrAdapter) V ¶ added in v0.28.2
func (log *LogrAdapter) V(level int) Logger
func (*LogrAdapter) WithName ¶ added in v0.28.2
func (log *LogrAdapter) WithName(name string) Logger
func (*LogrAdapter) WithValues ¶ added in v0.28.2
func (log *LogrAdapter) WithValues(keysAndValues ...interface{}) Logger
type Option ¶ added in v0.13.0
type Option func(*SpinnerLogSink)
func CheckMarkCharacter ¶
func ErrorMarkCharacter ¶
func Grouppable ¶
func Grouppable() Option
func SeparatorCharacter ¶
type SpinnerLogSink ¶ added in v0.28.0
type SpinnerLogSink struct {
// contains filtered or unexported fields
}
func NewSpinnerLogSink ¶ added in v0.28.0
func NewSpinnerLogSink(options ...Option) *SpinnerLogSink
func (*SpinnerLogSink) AddName ¶ added in v0.28.3
func (log *SpinnerLogSink) AddName(name string)
func (*SpinnerLogSink) AddValues ¶ added in v0.28.3
func (log *SpinnerLogSink) AddValues(keyAndValues []interface{})
func (*SpinnerLogSink) Copy ¶ added in v0.28.3
func (log *SpinnerLogSink) Copy() *SpinnerLogSink
func (*SpinnerLogSink) Enabled ¶ added in v0.28.0
func (log *SpinnerLogSink) Enabled(level int) bool
Enabled implements logr.LogSink interface
func (*SpinnerLogSink) Error ¶ added in v0.28.0
func (log *SpinnerLogSink) Error(e error, msg string, keysAndValues ...interface{})
Error implements logr.LogSink interface
func (*SpinnerLogSink) GetGrouppable ¶ added in v0.28.3
func (log *SpinnerLogSink) GetGrouppable() bool
func (*SpinnerLogSink) GetShowTime ¶ added in v0.28.3
func (log *SpinnerLogSink) GetShowTime() bool
func (*SpinnerLogSink) GetSpinner ¶ added in v0.28.3
func (log *SpinnerLogSink) GetSpinner() *spinner.Spinner
func (*SpinnerLogSink) GetValues ¶ added in v0.28.3
func (log *SpinnerLogSink) GetValues() []interface{}
func (*SpinnerLogSink) Grouped ¶ added in v0.28.0
func (log *SpinnerLogSink) Grouped(state bool)
func (*SpinnerLogSink) Info ¶ added in v0.28.0
func (log *SpinnerLogSink) Info(level int, msg string, keysAndValues ...interface{})
Info implements logr.LogSink interface
func (*SpinnerLogSink) Init ¶ added in v0.28.0
func (log *SpinnerLogSink) Init(_ logr.RuntimeInfo)
func (*SpinnerLogSink) InitSpinner ¶ added in v0.28.3
func (log *SpinnerLogSink) InitSpinner()
func (*SpinnerLogSink) SetDisableColor ¶ added in v0.28.4
func (log *SpinnerLogSink) SetDisableColor(disableColor bool)
func (*SpinnerLogSink) SetGrouppable ¶ added in v0.28.3
func (log *SpinnerLogSink) SetGrouppable(state bool)
func (*SpinnerLogSink) SetOptions ¶ added in v0.28.0
func (log *SpinnerLogSink) SetOptions(options ...Option)
func (*SpinnerLogSink) SetShowTime ¶ added in v0.28.3
func (log *SpinnerLogSink) SetShowTime(time bool)
func (*SpinnerLogSink) ShowTime ¶ added in v0.28.0
func (log *SpinnerLogSink) ShowTime(f bool) *SpinnerLogSink
func (*SpinnerLogSink) StopSpinner ¶ added in v0.28.3
func (log *SpinnerLogSink) StopSpinner()
func (*SpinnerLogSink) WithName ¶ added in v0.28.0
func (log *SpinnerLogSink) WithName(name string) logr.LogSink
WithName implements logr.LogSink interface
func (*SpinnerLogSink) WithValues ¶ added in v0.28.0
func (log *SpinnerLogSink) WithValues(keysAndValues ...interface{}) logr.LogSink
WithValues implements logr.LogSink interface
Click to show internal directories.
Click to hide internal directories.