logger

package
v0.0.0-...-bc6e940 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger struct {
	*zap.SugaredLogger
}

Logger provides the logging functionality.

func NewLogger

func NewLogger() *Logger

NewLogger initializes Logger instance.

func NewTestLogger

func NewTestLogger() (*Logger, *bytes.Buffer, *bufio.Writer)

NewTestLogger initializes a test Logger instance that is useful for testing purpose.

func (*Logger) DebugContext

func (logger *Logger) DebugContext(ctx context.Context, args ...interface{})

DebugContext uses fmt.Sprint to construct and log a message with the `trace_id` found in the context.

func (*Logger) DebugfContext

func (logger *Logger) DebugfContext(ctx context.Context, template string, args ...interface{})

DebugfContext uses fmt.Sprintf to log a templated message with the `trace_id` found in the context.

func (*Logger) ErrorContext

func (logger *Logger) ErrorContext(ctx context.Context, args ...interface{})

ErrorContext uses fmt.Sprint to construct and log a message with the `trace_id` found in the context.

func (*Logger) ErrorfContext

func (logger *Logger) ErrorfContext(ctx context.Context, template string, args ...interface{})

ErrorfContext uses fmt.Sprintf to log a templated message with the `trace_id` found in the context.

func (*Logger) InfoContext

func (logger *Logger) InfoContext(ctx context.Context, args ...interface{})

InfoContext uses fmt.Sprint to construct and log a message with the `trace_id` found in the context.

func (*Logger) InfofContext

func (logger *Logger) InfofContext(ctx context.Context, template string, args ...interface{})

InfofContext uses fmt.Sprintf to log a templated message with the `trace_id` found in the context.

func (*Logger) WarnContext

func (logger *Logger) WarnContext(ctx context.Context, args ...interface{})

WarnContext uses fmt.Sprint to construct and log a message with the `trace_id` found in the context.

func (*Logger) WarnfContext

func (logger *Logger) WarnfContext(ctx context.Context, template string, args ...interface{})

WarnfContext uses fmt.Sprintf to log a templated message with the `trace_id` found in the context.

Jump to

Keyboard shortcuts

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