1
0
mirror of https://github.com/kalmarek/PropertyT.jl.git synced 2024-12-25 02:15:29 +01:00

move setup-logging to the top of the file

This commit is contained in:
kalmar 2017-07-21 17:12:27 +02:00
parent a82eb13ef5
commit da32893d64

View File

@ -14,6 +14,18 @@ using Memento
const logger = Memento.config("info", fmt="{msg}")
const solver_logger = Memento.config("info", fmt="{msg}")
function setup_logging(name::String)
isdir(name) || mkdir(name)
Memento.add_handler(logger,
Memento.DefaultHandler(joinpath(name,"full_$(string((now()))).log"),
Memento.DefaultFormatter("{date}| {msg}")), "full_log")
# e = redirect_stderr(logger.handlers["full_log"].io)
return logger
end
function pmΔfilenames(name::String)
if !isdir(name)
mkdir(name)
@ -142,19 +154,6 @@ end
Kazhdan_from_sgap(λ,N) = sqrt(2*λ/N)
function setup_logging(name::String)
isdir(name) || mkdir(name)
Memento.add_handler(logger,
Memento.DefaultHandler(joinpath(name,"full_$(string((now()))).log"),
Memento.DefaultFormatter("{date}| {msg}")), "full_log")
# e = redirect_stderr(logger.handlers["full_log"].io)
return logger
end
function check_property_T(name::String, S, Id, solver, upper_bound, tol, radius)
isdir(name) || mkdir(name)