loggerimpl

package
v1.2.9-prerelease3 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: MIT Imports: 12 Imported by: 14

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDevelopment

func NewDevelopment() (log.Logger, error)

NewDevelopment returns a logger at debug level and log into STDERR

func NewLogger

func NewLogger(zapLogger *zap.Logger, opts ...Option) log.Logger

NewLogger returns a new logger

func NewNopLogger

func NewNopLogger() log.Logger

NewNopLogger returns a no-op logger

func NewReplayLogger

func NewReplayLogger(logger log.Logger, ctx workflow.Context, enableLogInReplay bool) log.Logger

NewReplayLogger creates a logger which is aware of cadence's replay mode

func NewThrottledLogger

func NewThrottledLogger(logger log.Logger, rps dynamicconfig.IntPropertyFn) log.Logger

NewThrottledLogger returns an implementation of logger that throttles the log messages being emitted. The underlying implementation uses a token bucket ratelimiter and stops emitting logs once the bucket runs out of tokens

Fatal/Panic logs are always emitted without any throttling

Types

type Option added in v1.2.7

type Option func(impl *loggerImpl)

Option is used to set options for the logger.

func WithSampleFunc added in v1.2.7

func WithSampleFunc(fn func(int) bool) Option

WithSampleFunc sets the sampling function for the logger.

Jump to

Keyboard shortcuts

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