log

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2020 License: Apache-2.0 Imports: 6 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	String   = zap.String
	Bytes    = zap.ByteString
	Duration = zap.Duration

	Int8  = zap.Int8
	Int32 = zap.Int32
	Int   = zap.Int
	Int64 = zap.Int64

	Uint8  = zap.Uint8
	Uint32 = zap.Uint32
	Uint   = zap.Uint
	Uint64 = zap.Uint64

	Float64 = zap.Float64

	Any = zap.Any
)

Functions

func Debug

func Debug(ctx context.Context, msg string, fields ...Field)

func Debugf

func Debugf(msg string, fields ...Field)

func Error

func Error(ctx context.Context, msg string, fields ...Field)

func Errorf

func Errorf(msg string, fields ...Field)

func Info

func Info(ctx context.Context, msg string, fields ...Field)

func Infof

func Infof(msg string, fields ...Field)

func Panic

func Panic(ctx context.Context, msg string, fields ...Field)

func Panicf

func Panicf(msg string, fields ...Field)

func Warn

func Warn(ctx context.Context, msg string, fields ...Field)

func Warnf

func Warnf(msg string, fields ...Field)

Types

type Config

type Config struct {
	AddCaller  bool
	CallerSkip int

	Level string

	Debug       bool
	WatchConfig bool

	OutputPath      []string
	ErrorOutputPath []string
}

type Field

type Field = zap.Field

type Logger

type Logger struct {
	// contains filtered or unexported fields
}

func New

func New(config *Config) *Logger

func (*Logger) SetLevel

func (l *Logger) SetLevel(level string)

func (*Logger) Sync

func (l *Logger) Sync()

Jump to

Keyboard shortcuts

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