app

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2020 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithLogContext

func WithLogContext(ctx context.Context, fields Fields) context.Context

Creates a copy of its first argument, with a new logging context All the logging fields of the previous logging context are shallow-copied into the new one

Types

type Fields

type Fields map[string]interface{}

type Logger

type Logger interface {
	Debug(msg string)
	Debugf(msg string, v ...interface{})
	Error(msg string)
	Errorf(msg string, v ...interface{})
	Fatal(msg string)
	Fatalf(msg string, v ...interface{})
	Info(msg string)
	Infof(msg string, v ...interface{})
	Trace(msg string) Logger
	Warn(msg string)
	Warnf(msg string, v ...interface{})
	WithError(err error) Logger
	WithField(key string, value interface{}) Logger
	WithFields(fields Fields) Logger
}

func ContextLogger

func ContextLogger(ctx context.Context, factory LoggerFactory) Logger

type LoggerFactory

type LoggerFactory func(fields []Fields) Logger

Jump to

Keyboard shortcuts

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