loggers

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 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 ECS

type ECS struct{}

ECS is a logger that will print logs in Elastic Common Schema ECS format.

func NewECS

func NewECS() ECS

NewECS creates a new ECS logger.

func (ECS) Error

func (ecs ECS) Error(ctx context.Context, msg string, info ...extensions.LogInfo)

Error logs a message at error level with context and additional info.

func (ECS) Info

func (ecs ECS) Info(ctx context.Context, msg string, info ...extensions.LogInfo)

Info logs a message at info level with context and additional info.

func (ECS) Warning

func (ecs ECS) Warning(ctx context.Context, msg string, info ...extensions.LogInfo)

Warning logs a message at warning level with context and additional info.

type Text

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

Text is a logger that will print logs in Elastic Common Schema format.

func NewText

func NewText() Text

NewText creates a new Human logger.

func (Text) Error

func (tl Text) Error(ctx context.Context, msg string, info ...extensions.LogInfo)

Error logs a message at error level with context and additional info.

func (Text) Info

func (tl Text) Info(ctx context.Context, msg string, info ...extensions.LogInfo)

Info logs a message at info level with context and additional info.

func (Text) Warning

func (tl Text) Warning(ctx context.Context, msg string, info ...extensions.LogInfo)

Warning logs a message at warning level with context and additional info.

Jump to

Keyboard shortcuts

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