log

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: May 18, 2022 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LogItem

type LogItem struct {
	Time    time.Time `json:"time"`
	Type    string    `json:"type"`
	Message string    `json:"message"`
}

type Logger

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

func NewLogger

func NewLogger() *Logger

func (*Logger) Debug

func (log *Logger) Debug(args ...interface{})

func (*Logger) Debugf

func (log *Logger) Debugf(format string, args ...interface{})

func (*Logger) Error

func (log *Logger) Error(args ...interface{})

func (*Logger) Errorf

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

func (*Logger) Fatal

func (log *Logger) Fatal(args ...interface{})

func (*Logger) Fatalf

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

func (*Logger) GetLogCache

func (log *Logger) GetLogCache() []LogItem

func (*Logger) Info

func (log *Logger) Info(args ...interface{})

func (*Logger) Infof

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

func (*Logger) Init

func (log *Logger) Init(logFile string, logOut bool, logLevel string)

Init initialises the logger based on a logging configuration

func (*Logger) Progressf

func (log *Logger) Progressf(format string, args ...interface{})

func (*Logger) SetLogLevel

func (log *Logger) SetLogLevel(level string)

func (*Logger) SubscribeToLog

func (log *Logger) SubscribeToLog(stop chan int) <-chan []LogItem

func (*Logger) Trace

func (log *Logger) Trace(args ...interface{})

func (*Logger) Tracef

func (log *Logger) Tracef(format string, args ...interface{})

func (*Logger) Warn

func (log *Logger) Warn(args ...interface{})

func (*Logger) Warnf

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

type ProgressFormatter

type ProgressFormatter struct{}

func (*ProgressFormatter) Format

func (f *ProgressFormatter) Format(entry *logrus.Entry) ([]byte, error)

Jump to

Keyboard shortcuts

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