Changeset View
Changeset View
Standalone View
Standalone View
src/dbwrapper.cpp
// Copyright (c) 2012-2016 The Bitcoin Core developers | // Copyright (c) 2012-2016 The Bitcoin Core developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#include "dbwrapper.h" | #include <dbwrapper.h> | ||||
#include "random.h" | #include <random.h> | ||||
#include "util.h" | #include <util.h> | ||||
#include <boost/filesystem.hpp> | #include <boost/filesystem.hpp> | ||||
#include <algorithm> | |||||
#include <cstdint> | |||||
#include <leveldb/cache.h> | #include <leveldb/cache.h> | ||||
#include <leveldb/env.h> | #include <leveldb/env.h> | ||||
#include <leveldb/filter_policy.h> | #include <leveldb/filter_policy.h> | ||||
#include <memenv.h> | #include <memenv.h> | ||||
#include <algorithm> | |||||
#include <cstdint> | |||||
class CBitcoinLevelDBLogger : public leveldb::Logger { | class CBitcoinLevelDBLogger : public leveldb::Logger { | ||||
public: | public: | ||||
// This code is adapted from posix_logger.h, which is why it is using | // This code is adapted from posix_logger.h, which is why it is using | ||||
// vsprintf. | // vsprintf. | ||||
// Please do not do this in normal code | // Please do not do this in normal code | ||||
void Logv(const char *format, va_list ap) override { | void Logv(const char *format, va_list ap) override { | ||||
if (!LogAcceptCategory(BCLog::LEVELDB)) { | if (!LogAcceptCategory(BCLog::LEVELDB)) { | ||||
return; | return; | ||||
▲ Show 20 Lines • Show All 201 Lines • Show Last 20 Lines |