Print debugging, but a little bit nicer.
The use case this is primarily designed for is effectively debugging problematic, flaky tests.
Use instead of
On first write,
testlog will create a log file if necessary. If
TESTLOG_PATH is specified, that path will be used for the log file, otherwise
testlog will create a new file in your temporary file directory with
If you invoke
testlog from multiple packages, say
B, and you test them simultaneously via e.g.
go test A B,
testlog may be executed by two (or more) test processes simultaneously (
go testing framework may run tests for
B as two different processes), in which case it would write to two different log files if
TESTLOG_PATH is not set.