Back to godoc.org

Package log

v0.1.0
Latest Go to latest

The latest major version is .

Published: Oct 9, 2020 | License: Apache-2.0 | Module: github.com/UnderTreeTech/waterdrop

Index

Variables

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
)

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)

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

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier