logger

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var LogCache []LogItem

Functions

func Debug

func Debug(args ...interface{})

func Debugf

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

func Error

func Error(args ...interface{})

func Errorf

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

func Fatal

func Fatal(args ...interface{})

func Fatalf

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

func Info

func Info(args ...interface{})

func Infof

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

func Init

func Init(logFile string, userLogFile string, logOut bool, logLevel string)

Init initialises the logger based on a logging configuration

func Progressf

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

func SetLogLevel

func SetLogLevel(level string)

func SubscribeToLog

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

func Trace

func Trace(args ...interface{})

func Userf

func Userf(user string, action string, format string, args ...interface{})

Userf logs a user operation to the user log.

func Warn

func Warn(args ...interface{})

func Warnf

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

Types

type LogItem

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

func GetLogCache

func GetLogCache() []LogItem

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