This avoids race-conditions in unit tests where the initialisation is on a different goroutine to the logging.