logging

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2018 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLogLevel added in v0.3.0

func GetLogLevel(logLevelStr string) zapcore.Level

GetLogLevel returns a new log level instance.

func NewDevInfoLogger

func NewDevInfoLogger() *zap.Logger

NewDevInfoLogger creates a new development logger at the INFO level.

func NewDevLogger

func NewDevLogger(logLevel zapcore.Level) *zap.Logger

NewDevLogger creates a new logger with a given log level for use in development (i.e., not production).

func NewProdLogger

func NewProdLogger(logLevel zapcore.Level) *zap.Logger

NewProdLogger creates a new logger with a given log level for use in production.

Types

type ErrArray

type ErrArray []error

ErrArray is an array of errors

func ToErrArray

func ToErrArray(errMap map[string]error) ErrArray

ToErrArray concerts a map of errors to an array of errors.

func (ErrArray) MarshalLogArray

func (errs ErrArray) MarshalLogArray(arr zapcore.ArrayEncoder) error

MarshalLogArray marshals the array of errors.

Jump to

Keyboard shortcuts

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