zaplog

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2021 License: MIT Imports: 6 Imported by: 1

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()

func (*Logger) SetLevel added in v0.6.0

func (l *Logger) SetLevel(lvl string)

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