raw

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: 8 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 raw event logging middleware, this uses zerolog to emit a log message for the input and output events

Types

type Option

type Option func(opts *rawOptions)

Option assign settings to the zerolog middlware

func Enabled added in v1.4.0

func Enabled(flag bool) Option

Enabled is a flag to toggle this middleware on or off. Defaults to true.

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 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