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

better formatting for loggers

This commit is contained in:
kalmar 2017-03-16 14:27:24 +01:00
parent ef1e33109d
commit 17cd369f3f

View File

@ -79,13 +79,13 @@ function timed_msg(t)
end end
function κandA(name::String, sdp_constraints, Δ::GroupAlgebraElement, solver::AbstractMathProgSolver; upper_bound=Inf) function κandA(name::String, sdp_constraints, Δ::GroupAlgebraElement, solver::AbstractMathProgSolver; upper_bound=Inf)
info(logger, "Creating SDP problem...")
if isfile("$name/solver.log") if isfile("$name/solver.log")
rm("$name/solver.log") rm("$name/solver.log")
end end
add_handler(solver_logger, DefaultHandler("./$name/solver.log"), "solver") add_handler(solver_logger, DefaultHandler("./$name/solver.log", DefaultFormatter("{date}| {msg}")), "solver")
info(logger, "Creating SDP problem...")
t = @timed SDP_problem = create_SDP_problem(sdp_constraints, Δ; upper_bound=upper_bound) t = @timed SDP_problem = create_SDP_problem(sdp_constraints, Δ; upper_bound=upper_bound)
info(logger, timed_msg(t)) info(logger, timed_msg(t))