added logging
This commit is contained in:
parent
d3a3f304ee
commit
1824d8db01
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user