From f560897b5b05993ef2e4355711cc9d9763791da2 Mon Sep 17 00:00:00 2001 From: "Carolyn.Maynard" Date: Thu, 18 Sep 2025 11:24:34 -0700 Subject: [PATCH 1/2] Add WARNING and INFO mgs to clarify routing module selection --- src/routing/Routing_Py_Adapter.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/routing/Routing_Py_Adapter.cpp b/src/routing/Routing_Py_Adapter.cpp index 4dbb87520d..6569a37e1a 100644 --- a/src/routing/Routing_Py_Adapter.cpp +++ b/src/routing/Routing_Py_Adapter.cpp @@ -19,17 +19,20 @@ Routing_Py_Adapter::Routing_Py_Adapter(std::string t_route_config_file_with_path //Import ngen_main. Will throw error if module isn't available //in the embedded interpreters PYTHON_PATH try { + LOG("Trying t-route module ngen_routing.ngen_main.", LogLevel::INFO); this->t_route_module = utils::ngenPy::InterpreterUtil::getPyModule("ngen_routing.ngen_main"); - LOG("Legacy t-route module detected; use of this version is deprecated!", LogLevel::WARNING); + LOG("Routing module ngen_routing.ngen_main detected and used. Use of this version is deprecated!", LogLevel::WARNING); } catch (const pybind11::error_already_set& e){ try { + LOG("Module ngen_routing.ngen_main not found; Trying different t-route module", LogLevel::WARNING); + LOG("Trying t-route module nwm_routing.__main__.", LogLevel::INFO); // The legacy module has a `nwm_routing.__main__`, so we have to try this one second! this->t_route_module = utils::ngenPy::InterpreterUtil::getPyModule("nwm_routing.__main__"); - LOG("Legacy t-route module nwm_routing.__main__ detected and used.", LogLevel::DEBUG); + LOG("Routing module nwm_routing.__main__ detected and used.", LogLevel::INFO); } catch (const pybind11::error_already_set& e){ - LOG("Unable to import a supported routing module.", LogLevel::FATAL); + LOG("Unable to import a supported routing module.", LogLevel::SEVERE); throw e; } } From 21ec7f460251b84bf08208b371cf3929c4049a20 Mon Sep 17 00:00:00 2001 From: "Carolyn.Maynard" Date: Thu, 18 Sep 2025 11:39:13 -0700 Subject: [PATCH 2/2] Revert "Add WARNING and INFO mgs to clarify routing module selection" This reverts commit f560897b5b05993ef2e4355711cc9d9763791da2. --- src/routing/Routing_Py_Adapter.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/routing/Routing_Py_Adapter.cpp b/src/routing/Routing_Py_Adapter.cpp index 6569a37e1a..4dbb87520d 100644 --- a/src/routing/Routing_Py_Adapter.cpp +++ b/src/routing/Routing_Py_Adapter.cpp @@ -19,20 +19,17 @@ Routing_Py_Adapter::Routing_Py_Adapter(std::string t_route_config_file_with_path //Import ngen_main. Will throw error if module isn't available //in the embedded interpreters PYTHON_PATH try { - LOG("Trying t-route module ngen_routing.ngen_main.", LogLevel::INFO); this->t_route_module = utils::ngenPy::InterpreterUtil::getPyModule("ngen_routing.ngen_main"); - LOG("Routing module ngen_routing.ngen_main detected and used. Use of this version is deprecated!", LogLevel::WARNING); + LOG("Legacy t-route module detected; use of this version is deprecated!", LogLevel::WARNING); } catch (const pybind11::error_already_set& e){ try { - LOG("Module ngen_routing.ngen_main not found; Trying different t-route module", LogLevel::WARNING); - LOG("Trying t-route module nwm_routing.__main__.", LogLevel::INFO); // The legacy module has a `nwm_routing.__main__`, so we have to try this one second! this->t_route_module = utils::ngenPy::InterpreterUtil::getPyModule("nwm_routing.__main__"); - LOG("Routing module nwm_routing.__main__ detected and used.", LogLevel::INFO); + LOG("Legacy t-route module nwm_routing.__main__ detected and used.", LogLevel::DEBUG); } catch (const pybind11::error_already_set& e){ - LOG("Unable to import a supported routing module.", LogLevel::SEVERE); + LOG("Unable to import a supported routing module.", LogLevel::FATAL); throw e; } }