trc1log

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeValue = "trace.1"

	SpanKey = "span"

	SpanIDKey          = "id"
	SpanNameKey        = "name"
	SpanParentIDKey    = "parentId"
	SpanTimestampKey   = "timestamp"
	SpanDurationKey    = "duration"
	SpanAnnotationsKey = "annotations"

	AnnotationTimestampKey = "timestamp"
	AnnotationValueKey     = "value"
	AnnotationEndpointKey  = "endpoint"

	EndpointServiceNameKey = "serviceName"
	EndpointIPv4Key        = "ipv4"
	EndpointIPv6Key        = "ipv6"
)

Variables

This section is empty.

Functions

func ApplyParam

func ApplyParam(p Param, entry wlog.LogEntry)

func WithLogger

func WithLogger(ctx context.Context, logger Logger) context.Context

WithLogger returns a copy of the provided context with the provided Logger included as a value.

Types

type Logger

type Logger interface {
	wtracing.Reporter
	Log(wtracing.SpanModel, ...Param)
}

func DefaultLogger

func DefaultLogger() Logger

func FromContext

func FromContext(ctx context.Context) Logger

FromContext returns the Logger stored in the provided context. If no logger was set on the context, returns a logger that logs to STDOUT at the INFO level with an empty origin field.

func New

func New(w io.Writer) Logger

func NewFromCreator

func NewFromCreator(w io.Writer, creator wlog.LoggerCreator) Logger

func WithParams

func WithParams(logger Logger, params ...Param) Logger

type Param

type Param interface {
	// contains filtered or unexported methods
}

func SID

func SID(sid string) Param

func TokenID

func TokenID(tokenID string) Param

func UID

func UID(uid string) Param

func UnsafeParam

func UnsafeParam(key string, value interface{}) Param

func UnsafeParams

func UnsafeParams(unsafe map[string]interface{}) Param

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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