zaplog

package module
v0.0.0-...-0f4be13 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

README

zaplog

Wrapper around zap logging. This is useful for providing a singleton logger and for creating common configurations across projects.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoggerFor

func LoggerFor(prefix string, config ...zap.Config) *zap.SugaredLogger

LoggerFor creates a new zap logger with the specified name.

func RegisterHook

func RegisterHook(h Hook)

RegisterHook registers the given Hook for listening to log events.

func SetConfig

func SetConfig(config zap.Config) error

Types

type Hook

type Hook func(entry zapcore.Entry) error

Hook is a function to which the logger will report logs.

Jump to

Keyboard shortcuts

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