logging

package
v0.2.12 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrSection

func ErrSection(err error) fmt.Stringer

func IntoContext

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

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

Types

type Logger

type Logger = tlogging.Logger

func FromContext

func FromContext(ctx context.Context) Logger

func NewLogger

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

type Operation

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

type Status = tlogging.Status
const (
	BeginStatus Status = "BEGIN"
	DoneStatus  Status = "DONE"
	EndStatus   Status = "END"
	ErrorStatus Status = "ERROR"
	LogStatus   Status = "LOG"
	OkStatus    Status = "OK"
	RunStatus   Status = "RUN"
	WarnStatus  Status = "WARN"
)

type TLogger

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
JackTT - Gopher 🇻🇳