log

package
v0.0.0-...-07f0968 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LevelDebug   level = "DEBUG"
	LevelInfo    level = "INFO"
	LevelWarning level = "WARNING"
	LevelStats   level = "STATS"
	LevelError   level = "ERROR"
	LevelFatal   level = "FATAL"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

type Entry struct {
	Time       time.Time   `json:"time"`
	Level      level       `json:"level"`
	Message    string      `json:"message"`
	Data       interface{} `json:"data"`
	StackTrace string      `json:"stackTrace"`
}

type Log

type Log interface {
	Debug(format string, args ...interface{})
	Info(format string, args ...interface{})
	Warning(format string, args ...interface{})
	Stats(data interface{})
	ErrorOn(err interface{})
	FatalOn(err interface{})
}

func New

func New(f ...func(*Entry)) Log

Jump to

Keyboard shortcuts

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