Skip to content

Commit

Permalink
Define logging module
Browse files Browse the repository at this point in the history
  • Loading branch information
szmyd committed Dec 13, 2023
1 parent e2a3d98 commit 5e5805c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 1 addition & 4 deletions src/lib/logger.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,7 @@ class nuraft_mesg_logger : public ::nuraft::logger {
std::shared_ptr< sisl::logging::logger_t > custom_logger) :
::nuraft::logger(), _group_id(group_id), _custom_logger(custom_logger) {}

void set_level(int l) override {
LOGD("Updating level to: {}", l);
SISL_LOG_LEVEL(nuraft, static_cast< spdlog::level::level_enum >(abs(l - 6)));
}
void set_level(int) override {}

void put_details(int level, const char* source_file, const char* func_name, size_t line_number,
const std::string& log_line) override {
Expand Down
2 changes: 2 additions & 0 deletions src/lib/manager_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ constexpr auto leader_change_timeout = std::chrono::milliseconds(3200);
constexpr auto grpc_client_threads = 1u;
constexpr auto grpc_server_threads = 1u;

SISL_LOGGING_DEF(nuraft_mesg)

namespace nuraft_mesg {

int32_t to_server_id(peer_id_t const& server_addr) {
Expand Down

0 comments on commit 5e5805c

Please sign in to comment.