Skip to content

Commit d6ff6cc

Browse files
authored
[solvers] Fix Gurobi console logging obey our defaults again (#22108)
1 parent 16e7281 commit d6ff6cc

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

solvers/gurobi_solver.cc

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -954,9 +954,7 @@ void GurobiSolver::DoSolve2(const MathematicalProgram& prog,
954954

955955
// Copy the remaining options into model_env.
956956
options->Respell([](const auto& common, auto* respelled) {
957-
if (common.print_to_console) {
958-
respelled->emplace("LogToConsole", 1);
959-
}
957+
respelled->emplace("LogToConsole", common.print_to_console ? 1 : 0);
960958
if (!common.print_file_name.empty()) {
961959
respelled->emplace("LogFile", common.print_file_name);
962960
}

0 commit comments

Comments
 (0)