From b0d5da245e0a8412dac549d54f27603d733a5450 Mon Sep 17 00:00:00 2001 From: Charlie Vanaret Date: Wed, 16 Oct 2024 11:43:47 +0200 Subject: [PATCH] Moved logger initialization to Uno.cpp --- bindings/AMPL/uno_ampl.cpp | 2 -- uno/Uno.cpp | 2 ++ unotest/unotest.cpp | 4 ---- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/bindings/AMPL/uno_ampl.cpp b/bindings/AMPL/uno_ampl.cpp index c9c9393f..d2ca25b6 100644 --- a/bindings/AMPL/uno_ampl.cpp +++ b/bindings/AMPL/uno_ampl.cpp @@ -46,8 +46,6 @@ namespace uno { Uno::print_optimization_summary(options, result); // std::cout << "memory_allocation_amount = " << memory_allocation_amount << '\n'; } - - Level Logger::level = INFO; } // namespace int main(int argc, char* argv[]) { diff --git a/uno/Uno.cpp b/uno/Uno.cpp index ce725d3e..be412481 100644 --- a/uno/Uno.cpp +++ b/uno/Uno.cpp @@ -21,6 +21,8 @@ namespace uno { max_iterations(options.get_unsigned_int("max_iterations")), time_limit(options.get_double("time_limit")) { } + + Level Logger::level = INFO; Result Uno::solve(const Model& model, Iterate& current_iterate, const Options& options) { std::cout << "Problem " << model.name << '\n' << model.number_variables << " variables, " << model.number_constraints << " constraints\n\n"; diff --git a/unotest/unotest.cpp b/unotest/unotest.cpp index 920ce138..953d2e0c 100644 --- a/unotest/unotest.cpp +++ b/unotest/unotest.cpp @@ -7,10 +7,6 @@ #include #include "tools/Logger.hpp" -namespace uno { - Level Logger::level = INFO; -} // namespace - // https://www.eriksmistad.no/getting-started-with-google-test-on-ubuntu/ int main(int argc, char **argv) { #if defined(HAS_MPI) && defined(MUMPS_PARALLEL)