logger

package
v0.0.0-...-f9f614f Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DPanic

func DPanic(msg string, fields ...zapcore.Field)

DPanic log panic level message & throw a panic in development mode

func Debug

func Debug(msg string, fields ...zapcore.Field)

Debug log debug level message

func Error

func Error(msg string, fields ...zapcore.Field)

Error log error level message

func Fatal

func Fatal(msg string, fields ...zapcore.Field)

Fatal log fatal level message & exit

func Flush

func Flush()

Flush make sure log in buffer will be synced.

func Info

func Info(msg string, fields ...zapcore.Field)

Info log info level message

func Named

func Named(name string) *zap.Logger

Named adds a new path segment to the logger's name. Segments are joined by periods.

func Panic

func Panic(msg string, fields ...zapcore.Field)

Panic log panic level message & throw a panic

func Sugar

func Sugar() *zap.SugaredLogger

Sugar converts a Logger to a SugaredLogger.

func Warn

func Warn(msg string, fields ...zapcore.Field)

Warn log warn level message

func With

func With(fields ...zapcore.Field) *zap.Logger

With creates a child logger and adds structured context to it. Fields added to the child don't affect the parent, and vice versa.

func WithOptions

func WithOptions(opts ...zap.Option) *zap.Logger

WithOptions clones the current Logger, applies the supplied Options, and returns the resulting Logger. It's safe to use concurrently.

Types

This section is empty.

Jump to

Keyboard shortcuts

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