rebuild for logging