log

package
v0.17.1 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 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 AdditionalInfo

type AdditionalInfo struct {
	Key   string
	Value interface{}
}

AdditionalInfo is a key-value pair that will be added to the log

type ECS

type ECS struct{}

func NewECS

func NewECS() ECS

NewECS creates a new ECS logger

func (ECS) Error

func (logger ECS) Error(ctx context.Context, msg string, info ...AdditionalInfo)

func (ECS) Info

func (logger ECS) Info(ctx context.Context, msg string, info ...AdditionalInfo)

type Interface added in v0.17.0

type Interface interface {
	// Info logs information based on a message and key-value elements
	Info(ctx context.Context, msg string, info ...AdditionalInfo)

	// Error logs error based on a message and key-value elements
	Error(ctx context.Context, msg string, info ...AdditionalInfo)
}

Logger is the interface that must be implemented by a logger

type Silent

type Silent struct {
}

Silent is a logger that does not log anything

func (Silent) Error

func (s Silent) Error(_ context.Context, _ string, _ ...AdditionalInfo)

Error logs error based on a message and key-value elements

func (Silent) Info

func (s Silent) Info(_ context.Context, _ string, _ ...AdditionalInfo)

Info logs information based on a message and key-value elements

Jump to

Keyboard shortcuts

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