logs

package
v0.0.0-...-99e5d07 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2021 License: MIT, Apache-2.0, BSD-3-Clause, + 1 more Imports: 10 Imported by: 7

Documentation

Index

Constants

View Source
const (
	CORE_LOGGER string = "CORE_LOGGER"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ILog

type ILog interface {
	logr.Logger
	InfoM(msg string, zapKeysAndVals ...zap.Field)
	ErrorM(err error, msg string)
	FatalM(err error, msg string)
	For(ctx context.Context) ILog
}

Inspired from https://github.com/go-logr/zapr, some functions is copy from the repo.

var (
	// JSONLogger is global json log format logr
	JSONLogger ILog

	// witholds a handle on a trancing object with which the library can log traces
	Span opentracing.Span
)

func NewJSONLogger

func NewJSONLogger(w zapcore.WriteSyncer, span opentracing.Span) ILog

NewJSONLogger creates a new json logging object using the given Zap Logger to log.

Jump to

Keyboard shortcuts

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