log

package
v0.0.22 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var VerboseLogger = (*logrus.Logger)(nil)
View Source
var VerboseLoggerOutputs = (*LoggerWriters)(nil)

Functions

func ConnectFileToVerboseLogOutput

func ConnectFileToVerboseLogOutput(filePath string) (close func(), err error)

func Error

func Error(args ...interface{})

func Errorf

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

func Fatalf

func Fatalf(format string, args ...interface{})

func Fatalln

func Fatalln(args ...interface{})

func Info

func Info(args ...interface{})

func Infof

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

func NewSpinner added in v0.0.22

func NewSpinner(message string) (start func(), stop func(), s *spinner.Spinner)

func Printf

func Printf(format string, args ...interface{})

func Println

func Println(args ...interface{})

func SendCloudReport

func SendCloudReport(messageLevel MessageLevel, message string, messageState MessageState, payload *map[string]interface{})

func SetCommandName

func SetCommandName(name string)

func Warn

func Warn(args ...interface{})

func Warnf

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

Types

type LoggerWriters

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

func NewLoggerOutputs

func NewLoggerOutputs(logger *logrus.Logger) *LoggerWriters

func (*LoggerWriters) Add

func (lw *LoggerWriters) Add(w io.Writer)

func (*LoggerWriters) Remove

func (lw *LoggerWriters) Remove(w io.Writer)

func (*LoggerWriters) Set

func (lw *LoggerWriters) Set()

type MessageLevel

type MessageLevel string
const (
	InfoLog    MessageLevel = "info"
	WarningLog MessageLevel = "warning"
	ErrorLog   MessageLevel = "error"
)

type MessageState

type MessageState string
const (
	Starting MessageState = "Starting"
	Running  MessageState = "Running"
	Failed   MessageState = "Failed"
	Success  MessageState = "Success"
)

Jump to

Keyboard shortcuts

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