Create a goroutine for logging