logging

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2023 License: Apache-2.0, MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LOG_DIR = "../artifacts"

	CHANNEL_ID_LOG_KEY   = "channel-id"
	OBJECTIVE_ID_LOG_KEY = "objective-id"
	ADDRESS_LOG_KEY      = "address"
)
View Source
const LevelTrace slog.Level = -5

Variables

This section is empty.

Functions

func LoggerWithAddress

func LoggerWithAddress(logger *slog.Logger, a types.Address) *slog.Logger

LoggerWithAddress returns a logger with the address attribute set to the given address

func SetupDefaultFileLogger

func SetupDefaultFileLogger(filename string, level slog.Level)

SetupDefaultFileLogger sets up a default logger that writes to the specified file The file will be created in the artifacts directory

func SetupDefaultLogger

func SetupDefaultLogger(w io.Writer, level slog.Level)

SetupDefaultLogger sets up a default logger that writes to the specified writer

func WithChannelIdAttribute

func WithChannelIdAttribute(c types.Destination) slog.Attr

WithChannelIdAttribute returns a logging attribute for the given channel id

func WithObjectiveIdAttribute

func WithObjectiveIdAttribute(o protocols.ObjectiveId) slog.Attr

WithObjectiveIdAttribute returns a logging attribute for the given objective id

Types

This section is empty.

Jump to

Keyboard shortcuts

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