How to save a file with the log of Gurobi solver in JuMP

Hi, I’m running a MIP model using JuMP with solver Gurobi and need to save the solution log as a file.
I tryed to read Gurobi documentation bur couldnt find how to do this in Julia.
Is there a way to do it?
Thanks in advance

Set the LogFile attribute: LogFile - Gurobi Optimization

using JuMP, Gurobi
model = Model(Gurobi.Optimizer)
set_optimizer_attribute(model, "LogFile", "my_log_file.txt")
1 Like

Thanks a lot @odow . It works well!

1 Like