added logging

This commit is contained in:
2025-02-22 04:14:43 -06:00
parent e65476d135
commit 7f586dc924
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;
}
utils::error::handle_info(
function_name, fmt::format("api info|{}|{}", server.id, response->body));
return 0;
}
} // namespace monitarr

View File

@@ -23,6 +23,7 @@
#include "actions.hpp"
#include "settings.hpp"
#include "utils/error.hpp"
namespace monitarr {
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;
}
} // namespace monitarr