log

package
v1.1.0-beta.17 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsEnabled

func IsEnabled() bool

IsEnabled reports whether the logger middleware is enabled in the configuration.

func Level

func Level() string

Level returns the configured log level.

func Module

func Module() fx.Option

Module returns fx module for initialization of event publisher middleware. Which depends on event wrapper provider module.

The module is only loaded once.

func NewLogger

func NewLogger() cloudevents.Middleware

NewLogger creates a logger middleware. The level will be as specified in config.

Types

type Logger

type Logger struct {
	cloudevents.UnimplementedMiddleware
	// contains filtered or unexported fields
}

Logger represents the logger middleware for events.

func (*Logger) After

func (m *Logger) After(ctx context.Context, in v2.Event, out *v2.Event, err error) (context.Context, error)

After logs output event info, if any, upon processing the handler.

func (*Logger) Before

func (m *Logger) Before(ctx context.Context, in *v2.Event) (context.Context, error)

Before logs input event info before processing the handler.

Jump to

Keyboard shortcuts

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