appcontext

package
v0.0.0-...-5f07eeb Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2020 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecorateRuntimeContext

func DecorateRuntimeContext(logger *nlog.Entry) *nlog.Entry

DecorateRuntimeContext represents a logger containing the "functionName" and "lineNumber" as fields

func Logger

func Logger(ctx context.Context) *nlog.Entry

Logger returns a zap logger with as much context as possible

func LoggerAndContext

func LoggerAndContext(ctx context.Context, reqID string) (*nlog.Entry, context.Context)

LoggerAndContext returns a zap logger and context

Types

type ContextType

type ContextType int

ContextType represents type of the context, used to in the application

const (
	//RequestIDKey represents the identifier of each REST request
	RequestIDKey ContextType = iota
	//UseCaseName usecase name
	UseCaseName
)

Jump to

Keyboard shortcuts

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