logger

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewStandardLogger

func NewStandardLogger(logLevel zapcore.Level) (l *zap.Logger, err error)

NewStandardLogger creates a new zap.Logger based on common configuration

This is intended to be used with zap.ReplaceGlobals() in an application's main.go.

func NewStandardZapConfig

func NewStandardZapConfig(logLevel zapcore.Level) zap.Config

NewStandardZapConfig returns a sensible [config](https://godoc.org/go.uber.org/zap#Config) for a Zap logger.

Types

type StandartLogger

type StandartLogger struct {
	*zap.SugaredLogger
}

func NewSugaredLogger

func NewSugaredLogger(logLevel zapcore.Level) StandartLogger

func (*StandartLogger) Infof

func (l *StandartLogger) Infof(template string, args ...interface{})

func (*StandartLogger) Write

func (l *StandartLogger) Write(p []byte) (n int, err error)

Jump to

Keyboard shortcuts

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