Package testlog provides a back-channel communication path between tests and package os, so that cmd/go can see which environment variables and files a test consults.
Getenv calls Logger().Getenv, if a logger has been set.
Open calls Logger().Open, if a logger has been set.
SetLogger sets the test logger implementation for the current process. It must be called only once, at process startup.
Stat calls Logger().Stat, if a logger has been set.
Interface is the interface required of test loggers. The os package will invoke the interface's methods to indicate that it is inspecting the given environment variables or files. Multiple goroutines may call these methods simultaneously.
Logger returns the current test logger implementation. It returns nil if there is no logger.