towerzap

package module
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry added in v0.3.0

type Entry struct {
	tower.Entry
}

func (Entry) MarshalLogObject added in v0.3.0

func (e Entry) MarshalLogObject(enc zapcore.ObjectEncoder) error

type Error

type Error struct {
	tower.Error
}

func (Error) MarshalLogObject

func (err Error) MarshalLogObject(enc zapcore.ObjectEncoder) error

type Logger

type Logger struct {
	*zap.Logger
	// contains filtered or unexported fields
}

func NewLogger

func NewLogger(l *zap.Logger) *Logger

func (Logger) Log

func (l Logger) Log(ctx context.Context, entry tower.Entry)

func (Logger) LogError

func (l Logger) LogError(ctx context.Context, err tower.Error)

func (*Logger) SetTraceCapturer

func (l *Logger) SetTraceCapturer(capturer TraceCapturer)

type TraceCapturer

type TraceCapturer interface {
	CaptureTrace(ctx context.Context) []zap.Field
}

type TraceCapturerFunc

type TraceCapturerFunc func(ctx context.Context) []zap.Field

func (TraceCapturerFunc) CaptureTrace

func (f TraceCapturerFunc) CaptureTrace(ctx context.Context) []zap.Field

Jump to

Keyboard shortcuts

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