abstract log away from train_object