From 87cfb742bf9a334e90cfd04fbdd44bcc793e4466 Mon Sep 17 00:00:00 2001 From: kalmar Date: Mon, 20 Mar 2017 22:11:26 +0100 Subject: [PATCH] add and remove log Handler in the same function (solve_SDP) --- src/PropertyT.jl | 2 ++ src/sdps.jl | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/PropertyT.jl b/src/PropertyT.jl index 0395d8f..b1a8ced 100644 --- a/src/PropertyT.jl +++ b/src/PropertyT.jl @@ -98,6 +98,8 @@ function κandA(name::String, sdp_constraints, Δ::GroupAlgebraElement, solver:: end end + remove_handler(solver_logger, "solver_log") + κ_fname, A_fname = κSDPfilenames(name) if κ > 0 save(κ_fname, "κ", κ) diff --git a/src/sdps.jl b/src/sdps.jl index d2446dd..66518d0 100644 --- a/src/sdps.jl +++ b/src/sdps.jl @@ -84,7 +84,6 @@ function solve_SDP(SDP_problem, solver) t = @timed solution_status = JuMP.solve(SDP_problem) info(logger, timed_msg(t)) Base.Libc.flush_cstdio() - remove_handler(solver_logger, "solver") redirect_stdout(o)