Remove boost log includes and remove last accidental logs

This commit is contained in:
Beaudan 2019-06-27 13:51:02 +10:00
parent 89b1ee5f3a
commit 16ee7cfdbf
12 changed files with 3 additions and 39 deletions

View file

@ -6,27 +6,14 @@
#include <vector>
#include <boost/filesystem/path.hpp>
#include <boost/log/attributes/mutable_constant.hpp>
#include <boost/log/trivial.hpp>
#include "spdlog/spdlog.h"
namespace logging = boost::log;
namespace fs = boost::filesystem;
#define LOKI_LOG(LVL, ...)\
spdlog::get("loki_logger")->LVL(__VA_ARGS__)
// Set attribute and return the new value
template <typename ValueType>
ValueType set_get_attrib(const char* name, ValueType value) {
auto attr = logging::attribute_cast<
logging::attributes::mutable_constant<ValueType>>(
logging::core::get()->get_thread_attributes()[name]);
attr.set(value);
return attr.get();
}
struct sn_record_t {
// our 32 byte pub keys should always be 52 bytes long in base32z

View file

@ -21,7 +21,6 @@
#include <thread>
#include <boost/beast/core/detail/base64.hpp>
#include <boost/log/trivial.hpp>
using json = nlohmann::json;
using namespace std::chrono_literals;

View file

@ -1,7 +1,6 @@
#include "https_client.h"
#include "signature.h"
#include <boost/log/trivial.hpp>
#include <openssl/x509.h>
namespace loki {

View file

@ -15,12 +15,6 @@
#include <boost/core/null_deleter.hpp>
#include <boost/filesystem.hpp>
#include <boost/log/expressions.hpp>
#include <boost/log/sinks/text_ostream_backend.hpp>
#include <boost/log/support/date_time.hpp>
#include <boost/log/trivial.hpp>
#include <boost/log/utility/setup/common_attributes.hpp>
#include <boost/log/utility/setup/file.hpp>
#include <boost/program_options.hpp>
#include <sodium.h>
@ -34,7 +28,6 @@
namespace fs = boost::filesystem;
namespace po = boost::program_options;
namespace logging = boost::log;
using LogLevelPair = std::pair<std::string, spdlog::level::level_enum>;
using LogLevelMap = std::vector<LogLevelPair>;

View file

@ -1,13 +1,11 @@
#include "rate_limiter.h"
#include "../common/src/common.h"
#include <algorithm>
#include <assert.h>
#include <random>
#include "../common/src/common.h"
#include <boost/log/trivial.hpp>
constexpr uint32_t RateLimiter::BUCKET_SIZE;
constexpr uint32_t RateLimiter::TOKEN_RATE;

View file

@ -6,7 +6,6 @@
#include <boost/endian/conversion.hpp>
#include <boost/format.hpp>
#include <boost/log/trivial.hpp>
using loki::storage::Item;

View file

@ -3,7 +3,6 @@
#include <boost/asio/buffer.hpp>
#include <boost/asio/ssl/context.hpp>
#include <boost/filesystem.hpp>
#include <boost/log/trivial.hpp>
#include <openssl/conf.h>
#include <openssl/crypto.h>

View file

@ -17,7 +17,6 @@
#include <boost/beast/core/detail/base64.hpp>
#include <boost/bind.hpp>
#include <boost/log/trivial.hpp>
using json = nlohmann::json;
using loki::storage::Item;

View file

@ -10,7 +10,6 @@
#include <boost/asio.hpp>
#include <boost/beast/http.hpp>
#include <boost/circular_buffer.hpp>
#include <boost/log/trivial.hpp>
#include <boost/optional.hpp>
#include <boost/thread/thread.hpp>

View file

@ -3,7 +3,6 @@
#include "service_node.h"
#include <boost/log/trivial.hpp>
#include <stdlib.h>
namespace loki {

View file

@ -2,7 +2,6 @@
#include "utils.hpp"
#include "sqlite3.h"
#include <boost/log/trivial.hpp>
#include <exception>
namespace loki {
@ -380,4 +379,4 @@ bool Database::retrieve(const std::string& pubKey, std::vector<Item>& items,
return success;
}
} // namespace loki
} // namespace loki

View file

@ -1,9 +1,6 @@
#include "serialization.h"
#include "service_node.h"
#include <boost/log/core.hpp>
#include <boost/log/expressions.hpp>
#include <boost/log/trivial.hpp>
#include <boost/test/unit_test.hpp>
#include <string>
@ -13,9 +10,6 @@ using namespace loki;
BOOST_AUTO_TEST_SUITE(serialization)
BOOST_AUTO_TEST_CASE(it_serializes_and_deserializes) {
boost::log::core::get()->set_filter(
boost::log::trivial::severity >=
boost::log::trivial::severity_level::info);
const auto pub_key =
"054368520005786b249bcd461d28f75e560ea794014eeb17fcf6003f37d876783e";