logger

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Log

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

func (*Log) Debugf

func (l *Log) Debugf(format string, a ...interface{})

func (*Log) Debugln

func (l *Log) Debugln(a ...interface{})

func (*Log) Errorf

func (l *Log) Errorf(format string, a ...interface{})

func (*Log) Errorln

func (l *Log) Errorln(a ...interface{})

func (*Log) Infof

func (l *Log) Infof(format string, a ...interface{})

func (*Log) Infoln

func (l *Log) Infoln(a ...interface{})

func (*Log) Level

func (l *Log) Level() LogLevel

func (*Log) Printf

func (l *Log) Printf(format string, a ...interface{})

func (*Log) Println

func (l *Log) Println(a ...interface{})

func (*Log) Printo

func (l *Log) Printo(a ...interface{})

func (*Log) ProgressBar

func (l *Log) ProgressBar() pterm.ProgressbarPrinter

func (*Log) SetLevel

func (l *Log) SetLevel(logLevel string) error

func (*Log) Spinner

func (l *Log) Spinner() pterm.SpinnerPrinter

func (*Log) Successf

func (l *Log) Successf(format string, a ...interface{})

func (*Log) Successln

func (l *Log) Successln(a ...interface{})

func (*Log) Table

func (l *Log) Table() pterm.TablePrinter

func (*Log) Warnf

func (l *Log) Warnf(format string, a ...interface{})

func (*Log) Warnln

func (l *Log) Warnln(a ...interface{})

type LogLevel

type LogLevel int
const (
	LogLevelDebug LogLevel = iota
	LogLevelInfo
	LogLevelWarn
	LogLevelError
)

type Logger

type Logger interface {
	Printf(format string, a ...interface{})
	Println(a ...interface{})
	Printo(a ...interface{})

	Debugf(format string, a ...interface{})
	Debugln(a ...interface{})
	Infof(format string, a ...interface{})
	Infoln(a ...interface{})
	Successf(format string, a ...interface{})
	Successln(a ...interface{})
	Warnf(format string, a ...interface{})
	Warnln(a ...interface{})
	Errorf(format string, a ...interface{})
	Errorln(a ...interface{})

	Level() LogLevel
	SetLevel(logLevel string) error

	Spinner() pterm.SpinnerPrinter
	ProgressBar() pterm.ProgressbarPrinter
	Table() pterm.TablePrinter
}

func NewLogger

func NewLogger() Logger

Jump to

Keyboard shortcuts

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