<!-- DO NOT DELETE OR IGNORE THIS TEMPLATE. Failing to adhere to this template and provide the necessary information may lead to your Issue being closed without consideration. --> ## Summary The `logfile` keyword argument to `solve` does not work correctly for `GurobiDirect`. <!-- Explain, in a clear and concise way, the command you ran and the result you were trying to achieve. Example: "I ran `pyomo solve` to optimize a model and ..." --> ### Steps to reproduce the issue <!-- Please include the command run and/or provide an example script that demonstrates the problem. --> ```python from pyomo.environ import * m = ConcreteModel() m.x = Var() m.c = Constraint(expr=(0.0, m.x, 1.0)) m.o = Objective(expr=m.x) s = SolverFactory("gurobi_direct") s.solve(m, logfile="gurobilog.out") ``` `gurobilog.out` is nowhere to be found. This seems to work correctly for other solvers, e.g., xpress, ipopt, cbc,.. ### Information on your system Pyomo version: 32591c154dd9268a62552969afc3f0ea2079db42 Python version: 3.12.9 Operating system: macOS How Pyomo was installed (PyPI, conda, source): source Solver (if applicable): Gurobi <!-- If you have any additional information, please list it here. --> <!-- We encourage you to try, as much as possible, to reduce your problem to the minimal example that still reproduces the issue. That would help us a lot in fixing it quickly and effectively! If you want to ask a question (how to use Pyomo, what it can do, etc.), please refer to our [online documentation](https://github.com/Pyomo/pyomo#getting-help) on ways to get help. -->