log

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Debug = logger.Debug
View Source
var Debugf = logger.Debugf
View Source
var Debugln = logger.Debugln
View Source
var Error = logger.Error
View Source
var Errorf = logger.Errorf
View Source
var Errorln = logger.Errorln
View Source
var Fatal = logger.Fatal
View Source
var Fatalf = logger.Fatalf
View Source
var Fatalln = logger.Fatalln
View Source
var Info = logger.Info
View Source
var Infof = logger.Infof
View Source
var Infoln = logger.Infoln
View Source
var Panic = logger.Panic
View Source
var Panicf = logger.Panicf
View Source
var Panicln = logger.Panicln
View Source
var Warn = logger.Warn
View Source
var Warnf = logger.Warnf
View Source
var Warnln = logger.Warnln

Functions

func Config

func Config(verbose bool, debug bool)

func Logger

func Logger() *logrus.Logger

func NewLogCapture added in v0.6.0

func NewLogCapture(logger *logrus.Logger) *logCapture

func OnReport added in v0.6.0

func OnReport(handler func(*ReportEntry))

func TopicLogger

func TopicLogger(topic string) *logrus.Entry

Types

type ReportEntry

type ReportEntry struct {
	Level   string    `json:"level"`
	Topic   string    `json:"topic"`
	Message string    `json:"message"`
	Time    time.Time `json:"time"`
}

type ReportHook

type ReportHook struct {
	LogLevels []logrus.Level
}

func NewReportHook

func NewReportHook() *ReportHook

func (*ReportHook) Fire

func (h *ReportHook) Fire(entry *logrus.Entry) error

func (*ReportHook) Levels

func (h *ReportHook) Levels() []logrus.Level

Jump to

Keyboard shortcuts

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