zerolog

package module
v1.5.1 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2023 License: Apache-2.0 Imports: 7 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(options ...Option) func(next lambda.Handler) lambda.Handler

New build a new zerlog middleware with the provided configuration which has Stack and Caller enabled

Types

type Option

type Option func(opts *zerlogOptions)

Option assign settings to the zerolog middlware

func Fields

func Fields(fields map[string]interface{}) Option

Fields pass a map of attributes which are appended to all log messages emitted by this logger.

func Level added in v1.4.0

func Level(level zerolog.Level) Option

Level minimum accepted level for logging. Defaults to zerolog.InfoLevel.

func Output

func Output(output io.Writer) Option

Output is a writer where logs in JSON format are written. Defaults to os.Stderr.

Jump to

Keyboard shortcuts

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