zap

package
v0.0.0-...-91d38f8 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2020 License: GPL-3.0, Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFlusher

func NewFlusher(s syncer) func()

NewFlusher creates a new syncer from given syncer that log a error message if failed to sync.

func NewLogger

func NewLogger(_ *cli.Context) (*zap.Logger, error)

NewLogger creates a new logger instance from cli.Context TODO: define Logger depend on flag

func NewSugaredLogger

func NewSugaredLogger(c *cli.Context) (*zap.SugaredLogger, func(), error)

NewSugaredLogger creates a new sugared logger and a flush function. The flush function should be called by consumer before quitting application. This function should be use most of the time unless the application requires extensive performance, in this case use NewLogger.

Types

This section is empty.

Jump to

Keyboard shortcuts

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