logging

package
v0.2.6 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrSection added in v0.0.6

func ErrSection(err error) fmt.Stringer

func IntoContext added in v0.0.4

func IntoContext(ctx context.Context, logger Logger) context.Context

func Log

func Log(ctx context.Context, operation Operation, status Status, color *color.Color, args ...fmt.Stringer)

func Section added in v0.0.6

func Section(name string, args ...any) fmt.Stringer

Types

type Logger

type Logger = tlogging.Logger

func FromContext added in v0.0.4

func FromContext(ctx context.Context) Logger

func NewLogger added in v0.0.2

func NewLogger(t TLogger, clock clock.PassiveClock, test string, step string) Logger

type Operation added in v0.0.6

type Operation = tlogging.Operation
const (
	Apply    Operation = "APPLY"
	Assert   Operation = "ASSERT"
	Catch    Operation = "CATCH"
	Cleanup  Operation = "CLEANUP"
	Command  Operation = "CMD"
	Create   Operation = "CREATE"
	Delete   Operation = "DELETE"
	Error    Operation = "ERROR"
	Finally  Operation = "FINALLY"
	Get      Operation = "GET"
	Internal Operation = "INTERNAL"
	Patch    Operation = "PATCH"
	Script   Operation = "SCRIPT"
	Sleep    Operation = "SLEEP"
	Stderr   Operation = "STDERR"
	Stdout   Operation = "STDOUT"
	Try      Operation = "TRY"
	Update   Operation = "UPDATE"
)

type Status added in v0.0.6

type Status = tlogging.Status
const (
	DoneStatus  Status = "DONE"
	ErrorStatus Status = "ERROR"
	OkStatus    Status = "OK"
	RunStatus   Status = "RUN"
	LogStatus   Status = "LOG"
)

type TLogger added in v0.0.4

type TLogger interface {
	Log(args ...any)
	Helper()
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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