structured

package
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LogCallArgs

type LogCallArgs struct {
	ContextFields log.Fields
	Report        bool
	Args          []interface{}
	Level         providers.LogLevel
}

type RecordCallArgs

type RecordCallArgs struct {
	ContextFields log.Fields
	Metrics       log.Metrics
	EventName     string
}

type StructuredOutputLogProvider

type StructuredOutputLogProvider struct {
	providers.LogProvider
	// contains filtered or unexported fields
}

func LogProvider

func LogProvider(nextProvider providers.LogProvider) *StructuredOutputLogProvider

func (*StructuredOutputLogProvider) Debug

func (p *StructuredOutputLogProvider) Debug(ctx context.Context, report bool, args ...interface{})

func (*StructuredOutputLogProvider) Error

func (p *StructuredOutputLogProvider) Error(ctx context.Context, report bool, args ...interface{})

func (*StructuredOutputLogProvider) Info

func (p *StructuredOutputLogProvider) Info(ctx context.Context, report bool, args ...interface{})

func (StructuredOutputLogProvider) LogCalls

func (p StructuredOutputLogProvider) LogCalls(levels ...providers.LogLevel) (result []*LogCallArgs)

Return list of log calls, filtered to only selected levels (if any present)

func (*StructuredOutputLogProvider) Record

func (p *StructuredOutputLogProvider) Record(ctx context.Context, metrics map[string]interface{})

func (StructuredOutputLogProvider) RecordCalls

func (p StructuredOutputLogProvider) RecordCalls() []*RecordCallArgs

func (*StructuredOutputLogProvider) RecordEvent

func (p *StructuredOutputLogProvider) RecordEvent(ctx context.Context, eventName string, metrics map[string]interface{})

func (*StructuredOutputLogProvider) Warn

func (p *StructuredOutputLogProvider) Warn(ctx context.Context, report bool, args ...interface{})

Jump to

Keyboard shortcuts

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