zap

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Level         string
	CollectorURL  string
	Hostname      string
	Namespace     string
	Source        string
	BuildCommit   string
	ConfigHash    string
	DisableStdout bool
}

type Logger

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

func NewLogger

func NewLogger(config *Config, options ...Option) (*Logger, error)

func (*Logger) Close

func (l *Logger) Close()

type Option

type Option func(options []zap.Option) []zap.Option

func AddCaller

func AddCaller() Option

func AddStacktrace

func AddStacktrace(level string) Option

func WithField

func WithField(key string, value interface{}) Option

Jump to

Keyboard shortcuts

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