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: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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