added logging

This commit is contained in:
Scott E. Graves 2025-02-22 04:14:43 -06:00
parent d3a3f304ee
commit 1824d8db01
2 changed files with 12 additions and 0 deletions

View File

@ -389,6 +389,9 @@ auto test_server(const server_cfg &server) -> int {
return 3; return 3;
} }
utils::error::handle_info(
function_name, fmt::format("api info|{}|{}", server.id, response->body));
return 0; return 0;
} }
} // namespace monitarr } // namespace monitarr

View File

@ -23,6 +23,7 @@
#include "actions.hpp" #include "actions.hpp"
#include "settings.hpp" #include "settings.hpp"
#include "utils/error.hpp"
namespace monitarr { namespace monitarr {
auto test_cmd(const app_config &cfg) -> int { auto test_cmd(const app_config &cfg) -> int {
@ -36,6 +37,14 @@ auto test_cmd(const app_config &cfg) -> int {
} }
} }
if (ret == 0) {
utils::error::handle_error(function_name,
"all servers tested successfully");
} else {
utils::error::handle_error(function_name,
"at least one server test failed");
}
return ret; return ret;
} }
} // namespace monitarr } // namespace monitarr