zlog

package
v0.0.0-...-41dce0b Latest Latest
Warning

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

Go to latest
Published: May 1, 2020 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Logger *zap.Logger

Functions

func Debug

func Debug(s string, args ...Field)

func Debugf

func Debugf(s string, args ...interface{})

func Error

func Error(s string, args ...Field)

func Errorf

func Errorf(s string, args ...interface{})

func Fatal

func Fatal(s string, args ...Field)

func Fatalf

func Fatalf(s string, args ...interface{})

func GetInstance

func GetInstance(isStdOut, isSave bool, logfile, level, encodingType string) *zap.Logger

func GetInstanceV2

func GetInstanceV2(isStdOut, isSave bool, logfile, level, encodingType string) *zap.Logger

func Info

func Info(s string, args ...Field)

func Infof

func Infof(s string, args ...interface{})

func Panic

func Panic(s string, args ...Field)

func Panicf

func Panicf(s string, args ...interface{})

func TimeEncoder

func TimeEncoder(t time.Time, enc zapcore.PrimitiveArrayEncoder)

func Warn

func Warn(s string, args ...Field)

func Warnf

func Warnf(s string, args ...interface{})

Types

type Discarder

type Discarder struct{ Syncer }

A Discarder sends all writes to ioutil.Discard.

func (*Discarder) Write

func (d *Discarder) Write(b []byte) (int, error)

Write implements io.Writer.

type Field

type Field = zapcore.Field

type Syncer

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

A Syncer is a spy for the Sync portion of zapcore.WriteSyncer.

func (*Syncer) Called

func (s *Syncer) Called() bool

Called reports whether the Sync method was called.

func (*Syncer) SetError

func (s *Syncer) SetError(err error)

SetError sets the error that the Sync method will return.

func (*Syncer) Sync

func (s *Syncer) Sync() error

Sync records that it was called, then returns the user-supplied error (if any).

Jump to

Keyboard shortcuts

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