Elichai Turkel 1f69f9eed9
Cleanup the logger and make it asynchronous (#1524)
* Remove Subsystems map and replace with RegisterSubSystem

* Clean up the logger

* Fix LOGFLAGS and make LongFile work correctly

* Parallelize the logger backend

* More logger cleanup

* Initialize and close the logger backend wherever it's needed

* Move the location where the backend is closed, also print the log if it panics while writing

* Add TestMain to reachability manager tests to preserve the same log level

* Fix review comments

Co-authored-by: Svarog <feanorr@gmail.com>
2021-03-01 14:04:40 +02:00

16 lines
305 B
Go

package txscript
import (
"github.com/kaspanet/kaspad/infrastructure/logger"
"os"
"testing"
)
func TestMain(m *testing.M) {
// set log level to trace, so that logClosures passed to log.Tracef are covered
log.SetLevel(logger.LevelTrace)
logger.InitLogStdout(logger.LevelTrace)
os.Exit(m.Run())
}