logger

package
v0.0.0-...-aec1c34 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CustomLogger

type CustomLogger struct {
	// contains filtered or unexported fields
}

func NewLogger

func NewLogger(env string) *CustomLogger

func (*CustomLogger) Configure

func (cl *CustomLogger) Configure(opts ...CustomLoggerOpt)

func (*CustomLogger) Debug

func (cl *CustomLogger) Debug(ctx context.Context, msg interface{})

func (*CustomLogger) Error

func (cl *CustomLogger) Error(ctx context.Context, msg interface{})

func (*CustomLogger) Info

func (cl *CustomLogger) Info(ctx context.Context, msg interface{})

func (*CustomLogger) LogIfError

func (cl *CustomLogger) LogIfError(ctx context.Context, err error)

LogIfError is a helper to log only non-nil errors

func (*CustomLogger) Warn

func (cl *CustomLogger) Warn(ctx context.Context, msg interface{})

type CustomLoggerOpt

type CustomLoggerOpt func(*CustomLogger) error

func WithSvcName

func WithSvcName(name string) CustomLoggerOpt

func WithTimeStamp

func WithTimeStamp() CustomLoggerOpt

Jump to

Keyboard shortcuts

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