log

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2020 License: Apache-2.0 Imports: 6 Imported by: 1

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