Commit 40ee4f93 authored by Georgios Bitzes's avatar Georgios Bitzes
Browse files

Use custom qclient logger, set to kWarn

parent b8b49c27
Pipeline #594971 failed with stages
in 56 minutes and 6 seconds
......@@ -2,7 +2,12 @@
All notable changes to this project will be documented in this file.
## Unreleased
- Updated rocksdb to v5.17.2
- Updated rocksdb dependency to v5.17.2
- Improved output of ``quarkdb-checkpoint`` command. The generated directory can now be used directly
to spin-up a full QuarkDB node. Command aliased to ``raft-checkpoint``.
- Light refactoring, more widespread use of ``std::string_view``, which paves the
way for certain performance optimizations in the future.
- Removed flood of "attempting connection to .. " messages when some node is unavailable
## 0.3.4 (2018-10-09)
- Updated rocksdb dependency to v5.15.10.
......
......@@ -26,6 +26,7 @@
#include "RaftContactDetails.hh"
#include "RaftTimeouts.hh"
#include "../Version.hh"
#include <qclient/Logger.hh>
using namespace quarkdb;
......@@ -65,6 +66,18 @@ private:
};
class QuarkDBLogger : public qclient::Logger {
public:
QuarkDBLogger() {
logLevel = qclient::LogLevel::kWarn;
}
void print(LogLevel level, int line, const std::string &file, const std::string &msg) override {
___log("QCLIENT (" << logLevelToString(level) << "): " << msg);
}
};
RaftTalker::RaftTalker(const RaftServer &server_, const RaftContactDetails &contactDetails)
: server(server_) {
......@@ -73,6 +86,7 @@ RaftTalker::RaftTalker(const RaftServer &server_, const RaftContactDetails &cont
opts.transparentRedirects = false;
opts.retryStrategy = qclient::RetryStrategy::NoRetries();
opts.backpressureStrategy = qclient::BackpressureStrategy::Default();
opts.logger.reset(new QuarkDBLogger());
opts.chainHmacHandshake(contactDetails.getPassword());
opts.chainHandshake(std::unique_ptr<Handshake>(new RaftHandshake(contactDetails)));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment