Skip to content

Print debugging, but a little bit nicer

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

rvolosatovs/testlog

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

testlog

Print debugging, but a little bit nicer.

The use case this is primarily designed for is effectively debugging problematic, flaky tests.

Usage

Use instead of fmt.Println, fmt.Printf, log.Println, log.Printf or $YOUR_FAVORITE_PRINT_FUNCTION.

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 testlog- prefix.

Notes

If you invoke testlog from multiple packages, say A and 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 A and B as two different processes), in which case it would write to two different log files if TESTLOG_PATH is not set.

About

Print debugging, but a little bit nicer

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages