logger

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// KeyRequestID should be used to put the request-id in a request's context.
	KeyRequestID contextKey = iota
	// KeyTraceID should be used to put the trace-id in a request's context.
	KeyTraceID
)

Variables

This section is empty.

Functions

func Debug

func Debug(ctx context.Context, format string, values ...interface{})

Debug logs at the debug level.

Use it for logs that will be useful only in a debug session.

func Error

func Error(ctx context.Context, format string, values ...interface{})

Error logs at the error level.

Use it for scenarios that are unwanted and unexpected.

func Fatal

func Fatal(ctx context.Context, format string, values ...interface{})

Fatal logs at the fatal level. It panics after logging.

Use it for scenarios that are absolutely catastrophic.

func Info

func Info(ctx context.Context, format string, values ...interface{})

Info logs at the info level.

Use it for logs that convey the basic functioning of the service.

func Warn

func Warn(ctx context.Context, format string, values ...interface{})

Warn logs at the warn level.

Use it for scenarios that are unwanted, yet expected.

Types

This section is empty.

Jump to

Keyboard shortcuts

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