testlog

package
v0.28.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2024 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LogFile

func LogFile() string

func Logger

func Logger() gethlog.Logger

func Setup

func Setup(cfg *Cfg) *os.File

Setup will direct logs to a timestamped log file with a standard naming pattern, useful for simulations etc.

func SetupSysOut added in v0.25.0

func SetupSysOut()

SetupSysOut will direct the test logs to stdout

Types

type Cfg

type Cfg struct {
	LogDir      string // directory for the log file
	TestType    string // type of test (comes before timestamp in filename so sorted file list will block these together)
	TestSubtype string // test subtype (comes after timestamp in filename so sorted file list will show latest of different subtypes together)
	LogLevel    slog.Level
}

Jump to

Keyboard shortcuts

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