mirror of
https://github.com/kalmarek/PropertyT.jl.git
synced 2024-11-19 07:20:28 +01:00
finally proper redirection of STDOUT to a file
This commit is contained in:
parent
28fe0820bc
commit
0dfd85adba
@ -131,14 +131,14 @@ function λandP(name::String, SDP::JuMP.Model, varλ, varP, warmstart=true)
|
|||||||
|
|
||||||
solver_log = setup_logging(name, :solverlog)
|
solver_log = setup_logging(name, :solverlog)
|
||||||
|
|
||||||
|
function f()
|
||||||
Base.Libc.flush_cstdio()
|
Base.Libc.flush_cstdio()
|
||||||
o = redirect_stdout(solver_log.handlers["solverlog"].io)
|
λ, P, w = solve_SDP(SDP, varλ, varP, warmstart=ws)
|
||||||
Base.Libc.flush_cstdio()
|
Base.Libc.flush_cstdio()
|
||||||
|
return λ, P, w
|
||||||
|
end
|
||||||
|
|
||||||
λ, P, warmstart = solve_SDP(SDP, varλ, varP, warmstart=ws)
|
λ, P, warmstart = redirect_stdout(f, solver_log.handlers["solverlog"].io)
|
||||||
|
|
||||||
Base.Libc.flush_cstdio()
|
|
||||||
redirect_stdout(o)
|
|
||||||
|
|
||||||
delete!(solver_log.handlers, "solverlog")
|
delete!(solver_log.handlers, "solverlog")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user