events

package
v2.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2019 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	Time   time.Time
	Fields map[string]string
}

Event describes a single log entry

func NewEvent

func NewEvent() Event

NewEvent creates a new empty Event whose timestamp is Now()

func (Event) AddFields

func (e Event) AddFields(f map[string]string)

AddFields adds a set of fields to the event

func (Event) AddLevel

func (e Event) AddLevel(l levels.Level)

AddLevel adds a log level as a string to the event

Jump to

Keyboard shortcuts

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