logger

package
v1.130.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 31, 2026 License: Apache-2.0 Imports: 12 Imported by: 25

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(msg string, fields ...zap.Field)

func DebugEnabled added in v1.130.0

func DebugEnabled() bool

DebugEnabled returns true if debug logging is enabled.

func Debugf

func Debugf(template string, args ...interface{})

func Error

func Error(err error)

func Errorf

func Errorf(template string, args ...interface{})

func Info

func Info(msg string, fields ...zap.Field)

func Infof

func Infof(template string, args ...interface{})

func SetDebug

func SetDebug()

func SetSilent added in v1.129.0

func SetSilent()

func Warnf

func Warnf(template string, args ...interface{})

Types

type CLILogger

type CLILogger struct {
	// contains filtered or unexported fields
}

func NewCLILogger

func NewCLILogger(w io.Writer) *CLILogger

func (*CLILogger) ActionWithSpinner

func (l *CLILogger) ActionWithSpinner(msg string, args ...interface{})

func (*CLILogger) ActionWithoutSpinner

func (l *CLILogger) ActionWithoutSpinner(msg string, args ...interface{})

func (*CLILogger) ActionWithoutSpinnerWarning

func (l *CLILogger) ActionWithoutSpinnerWarning(msg string, c *color.Color, args ...interface{})

func (*CLILogger) ChildActionWithSpinner

func (l *CLILogger) ChildActionWithSpinner(msg string, args ...interface{})

func (*CLILogger) ChildActionWithoutSpinner

func (l *CLILogger) ChildActionWithoutSpinner(msg string, args ...interface{})

func (*CLILogger) Debug

func (l *CLILogger) Debug(msg string, args ...interface{})

func (*CLILogger) Error

func (l *CLILogger) Error(err error)

func (*CLILogger) Errorf

func (l *CLILogger) Errorf(msg string, args ...interface{})

func (*CLILogger) Finish

func (l *CLILogger) Finish()

func (*CLILogger) FinishChildSpinner

func (l *CLILogger) FinishChildSpinner()

func (*CLILogger) FinishSpinner

func (l *CLILogger) FinishSpinner()

func (*CLILogger) FinishSpinnerWithError

func (l *CLILogger) FinishSpinnerWithError()

func (*CLILogger) FinishSpinnerWithWarning

func (l *CLILogger) FinishSpinnerWithWarning(c *color.Color)

FinishSpinnerWithWarning if no color is provided, color.FgYellow will be used

func (*CLILogger) Info

func (l *CLILogger) Info(msg string, args ...interface{})

func (*CLILogger) Initialize

func (l *CLILogger) Initialize()

func (*CLILogger) IsTerminal

func (l *CLILogger) IsTerminal() bool

func (*CLILogger) Silence

func (l *CLILogger) Silence()

func (*CLILogger) SlogHandler added in v1.130.0

func (l *CLILogger) SlogHandler() slog.Handler

SlogHandler returns an slog.Handler that routes log records to the CLILogger. Debug-level records use Debug (respecting Verbose); Info and above use Info; Error uses Errorf.

func (*CLILogger) Verbose

func (l *CLILogger) Verbose()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL