Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContextZerologAdapter ¶
ContextZerologAdapter returns a logging.Logger that implements logging.ContextLogger.
Use this if you are attaching a zerolog.Logger to every context passed into the AWS clients. The logger will be retrieved with zerolog.Ctx.
Usage
cfg, err := config.LoadDefaultConfig(context.TODO(), config.WithLogger(configsupport.ContextZerologAdapter()))
See https://aws.github.io/aws-sdk-go-v2/docs/configuring-sdk/logging/.
func Default ¶
func Default(o *config.LoadOptions) error
Default adds a context-aware zerolog logger (ContextZerologAdapter) as well as turn on client logging only if IsDebug is true.
Use this if you want a sensible setup for your AWS client.
Usage
cfg, err := config.LoadDefaultConfig(context.TODO(), configsupport.Default))
func IsDebug ¶
func IsDebug() bool
IsDebug returns true when DEBUG environment variable is "1" or "true".
func StaticZerologAdapter ¶
StaticZerologAdapter wraps a zerolog.Logger and returns a logging.Logger that does not implement logging.ContextLogger.
Use this if you aren't attaching a zerolog.Logger to every context passed into the AWS clients. Because zerolog.Ctx never returns nil (it may return a disabled logger), having a separate variant vs. one that is context-aware (ContextZerologAdapter) can be useful.
Usage
cfg, err := config.LoadDefaultConfig(context.TODO(), config.WithLogger(configsupport.NewContextlessZeroLogAdapter()))
See https://aws.github.io/aws-sdk-go-v2/docs/configuring-sdk/logging/.
Types ¶
This section is empty.