logger

package
v0.0.0-...-f871a89 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommonLogRunner

type CommonLogRunner struct {
}

func (CommonLogRunner) PostRun

func (l CommonLogRunner) PostRun(status LogStatus)

func (CommonLogRunner) PreRun

func (l CommonLogRunner) PreRun(message string) LogStatus

type LogRunner

type LogRunner interface {
	PreRun(message string) LogStatus
	PostRun(status LogStatus)
}

type LogStatus

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

func NewLogStatus

func NewLogStatus(logId string, startTime time.Time, message string) LogStatus

type LogTemplate

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

func NewLogTemplate

func NewLogTemplate(runner LogRunner) LogTemplate

func (LogTemplate) Execute

func (l LogTemplate) Execute(msg string, run Run[any]) TY

func (LogTemplate) IsEmpty

func (lt LogTemplate) IsEmpty() bool

type Run

type Run[T any] func() T

type TY

type TY any

Jump to

Keyboard shortcuts

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