log

package
v0.12.4 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LogTypeInfo  = "info"
	LogTypeError = "error"
	LogTypeDebug = "debug"
)

Variables

This section is empty.

Functions

func Debug added in v0.12.1

func Debug(entry string)

func Debugf added in v0.12.1

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

func Error added in v0.12.1

func Error(entry string)

func Errorf added in v0.12.1

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

func Info added in v0.12.1

func Info(entry string)

func Infof added in v0.12.1

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

Types

type LogEntry

type LogEntry struct {
	Timestamp time.Time    `json:"ts"`
	Type      LogEntryType `json:"type"`
	Entry     string       `json:"log"`
}

type LogEntryType

type LogEntryType string

type Logger added in v0.12.1

type Logger interface {
	WriteEntry(l LogEntry)
}

type MemoryLogger added in v0.12.1

type MemoryLogger struct {
	// contains filtered or unexported fields
}
var Memory *MemoryLogger

func (*MemoryLogger) Entries added in v0.12.1

func (m *MemoryLogger) Entries() []LogEntry

func (*MemoryLogger) WriteEntry added in v0.12.1

func (m *MemoryLogger) WriteEntry(l LogEntry)

type StdoutLogger added in v0.12.1

type StdoutLogger struct {
}

func (StdoutLogger) WriteEntry added in v0.12.1

func (m StdoutLogger) WriteEntry(l LogEntry)

Jump to

Keyboard shortcuts

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