util

package
v0.0.0-...-0bc2699 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfigureLogging

func ConfigureLogging(options ...LogConfigOption)

ConfigureLogging applies the provided LogConfigOption to the internal logger configuration.

func MustNewLogger

func MustNewLogger(options ...zap.Option) *zap.SugaredLogger

MustNewLogger instantiates a new zap logger with package-specific logging options.

Types

type Clock

type Clock struct{}

Clock provides a type for fetching the current time.

func (*Clock) Now

func (c *Clock) Now() time.Time

Now fetches the current time using the standard time library.

type LogConfigOption

type LogConfigOption func(*zap.Config)

LogConfigOption defines the function signature used to modify the global logging configuration.

func WithLogLevel

func WithLogLevel(level zapcore.Level) LogConfigOption

WithLogLevel creates a logging configuration option that sets the specified logging level.

func WithOutputFilePath

func WithOutputFilePath(path string) LogConfigOption

WithOutputFilePath creates a logging configuration option that specifies an output logging file with the specified path.

Jump to

Keyboard shortcuts

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