func Error(ctx context.Context, err error, xs ...Fer) {
	DefaultLogger.Error(ctx, err, xs...)
}
Error logs an error and information about the context of said error.
package ln
import (
	"context"
	"os"
	"time"
	"github.com/pkg/errors"
)
type Logger struct {
	Filters []Filter
}
var DefaultLogger *Logger
func init() {
	var defaultFilters []Filter
	out := os.Stdout
	if os.Getenv("LN_OUT") == "<stderr>" {
		out = os.Stderr
	}
	defaultFilters = append(
		defaultFilters,
		NewWriterFilter(out, nil),
	)
	DefaultLogger = &Logger{
		Filters: defaultFilters,
	}
}
type F map[string]interface{}
func (f F) Extend(other ...Fer) {
	for _, ff := range other {
		for k, v := range ff.F() {
			f[k] = v
		}
	}
}
func (f F) F() F {
	return f
}
type Fer interface {
	F() F
}
type Event struct {
	Time    time.Time
	Data    F
	Message string
}
func (l *Logger) Log(ctx context.Context, xs ...Fer) {
	event := Event{Time: time.Now()}
	addF := func(bf F) {
		if event.Data == nil {
			event.Data = bf
		} else {
			for k, v := range bf {
				event.Data[k] = v
			}
		}
	}
	for _, f := range xs {
		addF(f.F())
	}
	ctxf, ok := FFromContext(ctx)
	if ok {
		addF(ctxf)
	}
	if os.Getenv("LN_DEBUG_ALL_EVENTS") == "1" {
		frame := callersFrame()
		if event.Data == nil {
			event.Data = make(F)
		}
		event.Data["_lineno"] = frame.lineno
		event.Data["_function"] = frame.function
		event.Data["_filename"] = frame.filename
	}
	l.filter(ctx, event)
}
func (l *Logger) filter(ctx context.Context, e Event) {
	for _, f := range l.Filters {
		if !f.Apply(ctx, e) {
			return
		}
	}
}
func (l *Logger) Error(ctx context.Context, err error, xs ...Fer) {
	data := F{}
	frame := callersFrame()
	data["_lineno"] = frame.lineno
	data["_function"] = frame.function
	data["_filename"] = frame.filename
	data["err"] = err
	cause := errors.Cause(err)
	if cause != nil && cause.Error() != err.Error() {
		data["cause"] = cause.Error()
	}
	xs = append(xs, data)
	l.Log(ctx, xs...)
}
func (l *Logger) Fatal(ctx context.Context, xs ...Fer) {
	xs = append(xs, F{"fatal": true})
	l.Log(ctx, xs...)
	os.Exit(1)
}
func (l *Logger) FatalErr(ctx context.Context, err error, xs ...Fer) {
	xs = append(xs, F{"fatal": true})
	data := F{}
	frame := callersFrame()
	data["_lineno"] = frame.lineno
	data["_function"] = frame.function
	data["_filename"] = frame.filename
	data["err"] = err
	cause := errors.Cause(err)
	if cause != nil && cause.Error() != err.Error() {
		data["cause"] = cause.Error()
	}
	xs = append(xs, data)
	l.Log(ctx, xs...)
	os.Exit(1)
}
func Log(ctx context.Context, xs ...Fer) {
	DefaultLogger.Log(ctx, xs...)
}