Reduce logging verbosity.
When user specifies Solver::Options::logging_type = SILENT,
ensure that the minimizer does not log anything.
Change-Id: I94e34dae504881ab36d4a66e6adb7a19a227363e
diff --git a/internal/ceres/solver_impl.cc b/internal/ceres/solver_impl.cc
index a26ef9f..cf0e251 100644
--- a/internal/ceres/solver_impl.cc
+++ b/internal/ceres/solver_impl.cc
@@ -484,7 +484,7 @@
"Terminating: Function tolerance reached. "
"No non-constant parameter blocks found.";
summary->termination_type = CONVERGENCE;
- VLOG(1) << summary->message;
+ VLOG_IF(1, options.logging_type != SILENT) << summary->message;
summary->initial_cost = summary->fixed_cost;
summary->final_cost = summary->fixed_cost;
@@ -804,7 +804,7 @@
"Terminating: Function tolerance reached. "
"No non-constant parameter blocks found.";
summary->termination_type = CONVERGENCE;
- VLOG(1) << summary->message;
+ VLOG_IF(1, options.logging_type != SILENT) << summary->message;
const double post_process_start_time = WallTimeInSeconds();
SetSummaryFinalCost(summary);