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

**URL:** <https://discourse.julialang.org/t/how-to-save-a-file-with-the-log-of-gurobi-solver-in-jump/91874>\
**Category:** Optimization (Mathematical)\
**Tags:** jump\
**Created:** [December 19, 2022, 8:26pm UTC](https://discourse.julialang.org/t/how-to-save-a-file-with-the-log-of-gurobi-solver-in-jump/91874 "2022-12-19T20:26:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Luiz\_Monteiro](https://avatars.discourse-cdn.com/v4/letter/l/b77776/32.png) [@Luiz\_Monteiro](https://discourse.julialang.org/u/Luiz_Monteiro)\
**Post date:** [December 19, 2022, 8:26pm UTC](https://discourse.julialang.org/t/how-to-save-a-file-with-the-log-of-gurobi-solver-in-jump/91874/1 "2022-12-19T20:26:59Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![odow](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/odow/32/28685_2.png) [@odow](https://discourse.julialang.org/u/odow)\
**Post date:** [December 19, 2022, 8:32pm UTC](https://discourse.julialang.org/t/how-to-save-a-file-with-the-log-of-gurobi-solver-in-jump/91874/2 "2022-12-19T20:32:15Z")

</div>

Set the `LogFile` attribute: [LogFile - Gurobi Optimization](https://www.gurobi.com/documentation/10.0/refman/logfile.html#parameter:LogFile)

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

```

---

<div class="post-metadata">

**Author:** ![Luiz\_Monteiro](https://avatars.discourse-cdn.com/v4/letter/l/b77776/32.png) [@Luiz\_Monteiro](https://discourse.julialang.org/u/Luiz_Monteiro)\
**Post date:** [December 20, 2022, 12:55am UTC](https://discourse.julialang.org/t/how-to-save-a-file-with-the-log-of-gurobi-solver-in-jump/91874/3 "2022-12-20T00:55:20Z")

</div>

Thanks a lot @odow . It works well!
