1
0
mirror of https://github.com/kalmarek/PropertyT.jl.git synced 2024-11-14 14:15:28 +01:00

finally proper redirection of STDOUT to a file

This commit is contained in:
kalmarek 2018-08-18 23:28:06 +02:00
parent 28fe0820bc
commit 0dfd85adba

View File

@ -131,14 +131,14 @@ function λandP(name::String, SDP::JuMP.Model, varλ, varP, warmstart=true)
solver_log = setup_logging(name, :solverlog)
Base.Libc.flush_cstdio()
o = redirect_stdout(solver_log.handlers["solverlog"].io)
Base.Libc.flush_cstdio()
function f()
Base.Libc.flush_cstdio()
λ, P, w = solve_SDP(SDP, varλ, varP, warmstart=ws)
Base.Libc.flush_cstdio()
return λ, P, w
end
λ, P, warmstart = solve_SDP(SDP, varλ, varP, warmstart=ws)
Base.Libc.flush_cstdio()
redirect_stdout(o)
λ, P, warmstart = redirect_stdout(f, solver_log.handlers["solverlog"].io)
delete!(solver_log.handlers, "solverlog")