Print debugging, but a little bit nicer

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.

Owner
Roman Volosatovs
Go/Rust programmer
Roman Volosatovs
Similar Resources

Barry is a silly little thing I wanted to try, feel free to screenshot.

Barry What is Barry? Barry is a silly little thing I wanted to try, feel free to screenshot. If you manage to get panics after being told not to do th

Nov 6, 2021

Fynodoro is the little widget for doing Pomodoro.

Fynodoro is the little widget for doing Pomodoro.

Aug 21, 2022

A little tool to create small QR code cards for vaccination/test proof.

Icedream's fancy vaccination/test certificate card tool This is just a tool I wrote to transform my vaccine certificate QR codes into something I can

Dec 16, 2021

A little repository for my Advent of Code 2021 solutions in Go

Advent of Code 2021 What's this repo all about? Well, this is a collection of code written in Golang to solve the daily problems presented in Advent o

Dec 12, 2021

Lithia is an experimental functional programming language with an implicit but strong and dynamic type system.

Lithia is an experimental functional programming language with an implicit but strong and dynamic type system. Lithia is designed around a few core concepts in mind all language features contribute to.

Dec 24, 2022

Solution to elevator test problem but this time recursive and in go

Synopsis A multi-floor building has a Lift in it. People are queued on different floors waiting for the Lift. Some people want to go up. Some people w

Nov 8, 2021

Like comm(1), but for any number of files

ncomm is like comm, but for any number of files, not just two files.

Sep 20, 2022

Generic-list-go - Go container/list but with generics

generic-list-go Go container/list but with generics. The code is based on contai

Dec 7, 2022

Terrible Idea. Elm but in Go

Terrible Idea. Elm but in Go

Elmgo .' '.' `. _.-| o | o |-._ .~ `.__.'.__.'^ ~. .~ ^ / \ ^ ~. \-._^ ^| | ^_.-/ `\ `-._ \___/ ^_.-' /'

Feb 9, 2022
Optimized bit-level Reader and Writer for Go.

bitio Package bitio provides an optimized bit-level Reader and Writer for Go. You can use Reader.ReadBits() to read arbitrary number of bits from an i

Dec 1, 2022
A modification (and a bit of simplification) of the tracerr package.

Decrr A modification (and a bit of simplification) of the tracerr package. This essentially does pretty much the same, but instead of returning anothe

Nov 24, 2021
other glyph sets for high-dpi 1-bit monochrome

hd1b_other other glyph sets for high-dpi 1-bit monochrome Currently included glyph sets: Hangul (Korean): U+1100..U+11FF, U+3131..U+318E, U+AC00..U+D7

Aug 29, 2022
A bit reader tool written in golang

A bit reader tool written in golang

Dec 12, 2021
Eightbit - A converter to create shitty 8-bit like images

eightbit A converter to create shitty 8-bit like images. Usage To install: go in

Jan 8, 2022
mmdb-dump-networks - print every network in an MMDB to STDOUT

mmdb-dump-networks mmdb-dump-networks - print every network in an MMDB to STDOUT Project Description Usage Description Installation Reporting Bugs and

Oct 19, 2021
thermal print server for esc pos printers

thprint thprint is an extremely simple printing server for thermal printers connected to raspberry pis. This printing server exposes a print endpoint

Nov 4, 2021
Print lines matching a pattern in repositories using GitHub API
Print lines matching a pattern in repositories using GitHub API

gh-grep Print lines matching a pattern in repositories using GitHub API Usage $ gh grep func.*schema.Schema --include=**/*.go --owner k1LoW --repo tbl

Dec 1, 2022
Verify and print TPM2.0 Quotes

Verify and print TPM2.0 Quotes Signature verified Firmware Version: XXXXXXXXXXXXXX Clock: XXXXXXXXX Resetcount: 9 Restartcount: 0 Safe: 01 Nonce Incl

Apr 15, 2022
📖 A little book on Ethereum Development with Go (golang)
📖 A little book on Ethereum Development with Go (golang)

Ethereum Development with Go A little book on Ethereum Development with Go (golang) Online https://goethereumbook.org E-book The e-book is avaiable in

Dec 29, 2022