diff --git a/eth/main.cpp b/eth/main.cpp index a4a35779c..fa78a4190 100644 --- a/eth/main.cpp +++ b/eth/main.cpp @@ -359,7 +359,7 @@ int main(int argc, char** argv) cout << credits(); - StructuredLogger structuredLogger(structuredLogging, structuredLoggingFormat); + StructLog.initialize(structuredLogging, structuredLoggingFormat); VMFactory::setKind(jit ? VMKind::JIT : VMKind::Interpreter); NetworkPreferences netPrefs(listenPort, publicIP, upnp, useLocal); auto nodesState = contents((dbPath.size() ? dbPath : getDataDir()) + "/network.rlp"); @@ -371,12 +371,11 @@ int main(int argc, char** argv) mode == NodeMode::Full ? set{"eth", "shh"} : set(), netPrefs, &nodesState, - miners, - structuredLogger + miners ); web3.setIdealPeerCount(peers); eth::Client* c = mode == NodeMode::Full ? web3.ethereum() : nullptr; - structuredLogger.logStarting(clientImplString, dev::Version); + StructLog.starting(clientImplString, dev::Version); if (c) { c->setForceMining(forceMining); @@ -910,7 +909,7 @@ int main(int argc, char** argv) while (!g_exit) this_thread::sleep_for(chrono::milliseconds(1000)); - structuredLogger.logStopping(clientImplString, dev::Version); + StructLog.stopping(clientImplString, dev::Version); auto netData = web3.saveNetwork(); if (!netData.empty()) writeFile((dbPath.size() ? dbPath : getDataDir()) + "/network.rlp", netData); diff --git a/libdevcore/StructuredLogger.cpp b/libdevcore/StructuredLogger.cpp index 4121f7cc2..5fd605e3a 100644 --- a/libdevcore/StructuredLogger.cpp +++ b/libdevcore/StructuredLogger.cpp @@ -54,7 +54,7 @@ void StructuredLogger::outputJson(Json::Value const& _value, std::string const& cout << event << endl << flush; } -void StructuredLogger::logStarting(string const& _clientImpl, const char* _ethVersion) const +void StructuredLogger::starting(string const& _clientImpl, const char* _ethVersion) const { if (m_enabled) { @@ -67,7 +67,7 @@ void StructuredLogger::logStarting(string const& _clientImpl, const char* _ethVe } } -void StructuredLogger::logStopping(string const& _clientImpl, const char* _ethVersion) const +void StructuredLogger::stopping(string const& _clientImpl, const char* _ethVersion) const { if (m_enabled) { @@ -80,7 +80,7 @@ void StructuredLogger::logStopping(string const& _clientImpl, const char* _ethVe } } -void StructuredLogger::logP2PConnected(string const& _id, bi::tcp::endpoint const& _addr, +void StructuredLogger::p2pConnected(string const& _id, bi::tcp::endpoint const& _addr, chrono::system_clock::time_point const& _ts, string const& _remoteVersion, unsigned int _numConnections) const { if (m_enabled) @@ -98,7 +98,7 @@ void StructuredLogger::logP2PConnected(string const& _id, bi::tcp::endpoint cons } } -void StructuredLogger::logP2PDisconnected(string const& _id, bi::tcp::endpoint const& _addr, unsigned int _numConnections) const +void StructuredLogger::p2pDisconnected(string const& _id, bi::tcp::endpoint const& _addr, unsigned int _numConnections) const { if (m_enabled) { @@ -114,7 +114,7 @@ void StructuredLogger::logP2PDisconnected(string const& _id, bi::tcp::endpoint c } } -void StructuredLogger::logMinedNewBlock(string const& _hash, string const& _blockNumber, +void StructuredLogger::minedNewBlock(string const& _hash, string const& _blockNumber, string const& _chainHeadHash, string const& _prevHash) const { if (m_enabled) @@ -130,7 +130,7 @@ void StructuredLogger::logMinedNewBlock(string const& _hash, string const& _bloc } } -void StructuredLogger::logChainReceivedNewBlock(string const& _hash, string const& _blockNumber, +void StructuredLogger::chainReceivedNewBlock(string const& _hash, string const& _blockNumber, string const& _chainHeadHash, string const& _remoteID, string const& _prevHash) const { if (m_enabled) @@ -147,7 +147,7 @@ void StructuredLogger::logChainReceivedNewBlock(string const& _hash, string cons } } -void StructuredLogger::logChainNewHead(string const& _hash, string const& _blockNumber, +void StructuredLogger::chainNewHead(string const& _hash, string const& _blockNumber, string const& _chainHeadHash, string const& _prevHash) const { if (m_enabled) @@ -163,7 +163,7 @@ void StructuredLogger::logChainNewHead(string const& _hash, string const& _block } } -void StructuredLogger::logTransactionReceived(string const& _hash, string const& _remoteId) const +void StructuredLogger::transactionReceived(string const& _hash, string const& _remoteId) const { if (m_enabled) { diff --git a/libdevcore/StructuredLogger.h b/libdevcore/StructuredLogger.h index 7fbde7c5a..3557d6c68 100644 --- a/libdevcore/StructuredLogger.h +++ b/libdevcore/StructuredLogger.h @@ -38,31 +38,42 @@ namespace dev class StructuredLogger { public: - /// Default constructor, logging off - StructuredLogger(): m_enabled(false){} /** - * Initializes a structured logger object + * Initializes the structured logger object * @param _enabled Whether logging is on or off * @param _timeFormat A time format string as described here: * http://en.cppreference.com/w/cpp/chrono/c/strftime * with which to display timestamps */ - StructuredLogger(bool _enabled, std::string const& _timeFormat): - m_enabled(_enabled), m_timeFormat(_timeFormat) {} + void initialize(bool _enabled, std::string const& _timeFormat) + { + m_enabled = _enabled; + m_timeFormat = _timeFormat; + } - void logStarting(std::string const& _clientImpl, const char* _ethVersion) const; - void logStopping(std::string const& _clientImpl, const char* _ethVersion) const; - void logP2PConnected(std::string const& _id, bi::tcp::endpoint const& _addr, + static StructuredLogger& get() + { + static StructuredLogger instance; + return instance; + } + + void starting(std::string const& _clientImpl, const char* _ethVersion) const; + void stopping(std::string const& _clientImpl, const char* _ethVersion) const; + void p2pConnected(std::string const& _id, bi::tcp::endpoint const& _addr, std::chrono::system_clock::time_point const& _ts, std::string const& _remoteVersion, unsigned int _numConnections) const; - void logP2PDisconnected(std::string const& _id, bi::tcp::endpoint const& _addr, unsigned int _numConnections) const; - void logMinedNewBlock(std::string const& _hash, std::string const& _blockNumber, + void p2pDisconnected(std::string const& _id, bi::tcp::endpoint const& _addr, unsigned int _numConnections) const; + void minedNewBlock(std::string const& _hash, std::string const& _blockNumber, std::string const& _chainHeadHash, std::string const& _prevHash) const; - void logChainReceivedNewBlock(std::string const& _hash, std::string const& _blockNumber, std::string const& _chainHeadHash, + void chainReceivedNewBlock(std::string const& _hash, std::string const& _blockNumber, std::string const& _chainHeadHash, std::string const& _remoteID, std::string const& _prevHash) const; - void logChainNewHead(std::string const& _hash, std::string const& _blockNumber, std::string const& _chainHeadHash, + void chainNewHead(std::string const& _hash, std::string const& _blockNumber, std::string const& _chainHeadHash, std::string const& _prevHash) const; - void logTransactionReceived(std::string const& _hash, std::string const& _remoteId) const; + void transactionReceived(std::string const& _hash, std::string const& _remoteId) const; private: + // Singleton class, no copying + StructuredLogger() {} + StructuredLogger(StructuredLogger const&) = delete; + void operator=(StructuredLogger const&) = delete; /// @returns a string representation of a timepoint std::string timePointToString(std::chrono::system_clock::time_point const& _ts) const; void outputJson(Json::Value const& _value, std::string const& _name) const; @@ -71,4 +82,8 @@ private: std::string m_timeFormat = "%Y-%m-%dT%H:%M:%S"; }; +/// Convenience macro to get the singleton instance +/// Calling the logging functions becomes as simple as: StructLog.transactionReceived(...) +#define StructLog StructuredLogger::get() + } diff --git a/libethereum/BlockChain.cpp b/libethereum/BlockChain.cpp index 6cce7b51b..690a8976b 100644 --- a/libethereum/BlockChain.cpp +++ b/libethereum/BlockChain.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -152,7 +153,7 @@ inline string toString(h256s const& _bs) return out.str(); } -h256s BlockChain::sync(BlockQueue& _bq, OverlayDB const& _stateDB, unsigned _max, StructuredLogger const& _logger) +h256s BlockChain::sync(BlockQueue& _bq, OverlayDB const& _stateDB, unsigned _max) { _bq.tick(*this); @@ -164,7 +165,7 @@ h256s BlockChain::sync(BlockQueue& _bq, OverlayDB const& _stateDB, unsigned _max { try { - for (auto h: import(block, _stateDB, _logger)) + for (auto h: import(block, _stateDB)) if (!_max--) break; else @@ -187,11 +188,11 @@ h256s BlockChain::sync(BlockQueue& _bq, OverlayDB const& _stateDB, unsigned _max return ret; } -h256s BlockChain::attemptImport(bytes const& _block, OverlayDB const& _stateDB, StructuredLogger const& _logger) noexcept +h256s BlockChain::attemptImport(bytes const& _block, OverlayDB const& _stateDB) noexcept { try { - return import(_block, _stateDB, _logger); + return import(_block, _stateDB); } catch (...) { @@ -200,7 +201,7 @@ h256s BlockChain::attemptImport(bytes const& _block, OverlayDB const& _stateDB, } } -h256s BlockChain::import(bytes const& _block, OverlayDB const& _db, StructuredLogger const& _logger) +h256s BlockChain::import(bytes const& _block, OverlayDB const& _db) { // VERIFY: populates from the block and checks the block is internally coherent. BlockInfo bi; @@ -317,7 +318,7 @@ h256s BlockChain::import(bytes const& _block, OverlayDB const& _db, StructuredLo } #endif - _logger.logChainReceivedNewBlock( + StructLog.chainReceivedNewBlock( bi.headerHash(WithoutNonce).abridged(), bi.nonce.abridged(), currentHash().abridged(), @@ -337,7 +338,7 @@ h256s BlockChain::import(bytes const& _block, OverlayDB const& _db, StructuredLo } m_extrasDB->Put(m_writeOptions, ldb::Slice("best"), ldb::Slice((char const*)&newHash, 32)); clog(BlockChainNote) << " Imported and best" << td << ". Has" << (details(bi.parentHash).children.size() - 1) << "siblings. Route:" << toString(ret); - _logger.logChainNewHead( + StructLog.chainNewHead( bi.headerHash(WithoutNonce).abridged(), bi.nonce.abridged(), currentHash().abridged(), diff --git a/libethereum/BlockChain.h b/libethereum/BlockChain.h index 6d36b14cd..576deaadf 100644 --- a/libethereum/BlockChain.h +++ b/libethereum/BlockChain.h @@ -32,7 +32,6 @@ #include #include #include -#include #include "BlockDetails.h" #include "Account.h" #include "BlockQueue.h" @@ -80,15 +79,15 @@ public: void process(); /// Sync the chain with any incoming blocks. All blocks should, if processed in order - h256s sync(BlockQueue& _bq, OverlayDB const& _stateDB, unsigned _max, StructuredLogger const& _logger); + h256s sync(BlockQueue& _bq, OverlayDB const& _stateDB, unsigned _max); /// Attempt to import the given block directly into the CanonBlockChain and sync with the state DB. /// @returns the block hashes of any blocks that came into/went out of the canonical block chain. - h256s attemptImport(bytes const& _block, OverlayDB const& _stateDB, StructuredLogger const& _logger = StructuredLogger()) noexcept; + h256s attemptImport(bytes const& _block, OverlayDB const& _stateDB) noexcept; /// Import block into disk-backed DB /// @returns the block hashes of any blocks that came into/went out of the canonical block chain. - h256s import(bytes const& _block, OverlayDB const& _stateDB, StructuredLogger const& _logger = StructuredLogger()); + h256s import(bytes const& _block, OverlayDB const& _stateDB); /// Returns true if the given block is known (though not necessarily a part of the canon chain). bool isKnown(h256 _hash) const; diff --git a/libethereum/Client.cpp b/libethereum/Client.cpp index a4e9c9a66..38901643a 100644 --- a/libethereum/Client.cpp +++ b/libethereum/Client.cpp @@ -25,6 +25,7 @@ #include #include #include +#include #include #include "Defaults.h" #include "Executive.h" @@ -59,15 +60,13 @@ void VersionChecker::setOk() } } -Client::Client(p2p::Host* _extNet, std::string const& _dbPath, bool _forceClean, - u256 _networkId, int _miners, StructuredLogger const& _structuredLogger): +Client::Client(p2p::Host* _extNet, std::string const& _dbPath, bool _forceClean, u256 _networkId, int _miners): Worker("eth"), m_vc(_dbPath), m_bc(_dbPath, !m_vc.ok() || _forceClean), m_stateDB(State::openDB(_dbPath, !m_vc.ok() || _forceClean)), m_preMine(Address(), m_stateDB), - m_postMine(Address(), m_stateDB), - m_structuredLogger(_structuredLogger) + m_postMine(Address(), m_stateDB) { m_host = _extNet->registerCapability(new EthereumHost(m_bc, m_tq, m_bq, _networkId)); @@ -417,7 +416,7 @@ void Client::transact(Secret _secret, u256 _value, Address _dest, bytes const& _ } Transaction t(_value, _gasPrice, _gas, _dest, _data, n, _secret); // cdebug << "Nonce at " << toAddress(_secret) << " pre:" << m_preMine.transactionsFrom(toAddress(_secret)) << " post:" << m_postMine.transactionsFrom(toAddress(_secret)); - m_structuredLogger.logTransactionReceived(t.sha3().abridged(), t.sender().abridged()); + StructLog.transactionReceived(t.sha3().abridged(), t.sender().abridged()); cnote << "New transaction " << t; m_tq.attemptImport(t.rlp()); } @@ -523,7 +522,7 @@ void Client::doWork() h256s hs; { WriteGuard l(x_stateDB); - hs = m_bc.attemptImport(m.blockData(), m_stateDB, m_structuredLogger); + hs = m_bc.attemptImport(m.blockData(), m_stateDB); } if (hs.size()) { @@ -558,7 +557,7 @@ void Client::doWork() cwork << "BQ ==> CHAIN ==> STATE"; OverlayDB db = m_stateDB; x_stateDB.unlock(); - h256s newBlocks = m_bc.sync(m_bq, db, 100, m_structuredLogger); // TODO: remove transactions from m_tq nicely rather than relying on out of date nonce later on. + h256s newBlocks = m_bc.sync(m_bq, db, 100); // TODO: remove transactions from m_tq nicely rather than relying on out of date nonce later on. if (newBlocks.size()) { for (auto i: newBlocks) diff --git a/libethereum/Client.h b/libethereum/Client.h index 33b0080f2..31aa1aee3 100644 --- a/libethereum/Client.h +++ b/libethereum/Client.h @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include "CanonBlockChain.h" @@ -169,7 +168,7 @@ class Client: public MinerHost, public Interface, Worker public: /// New-style Constructor. explicit Client(p2p::Host* _host, std::string const& _dbPath = std::string(), bool _forceClean = false, - u256 _networkId = 0, int _miners = -1, StructuredLogger const& _structuredLogger = StructuredLogger()); + u256 _networkId = 0, int _miners = -1); /// Destructor. virtual ~Client(); @@ -367,7 +366,6 @@ private: std::map m_filters; std::map m_watches; - StructuredLogger const& m_structuredLogger; mutable std::chrono::system_clock::time_point m_lastGarbageCollection; }; diff --git a/libethereum/Miner.cpp b/libethereum/Miner.cpp index 03cceed74..a049fca2f 100644 --- a/libethereum/Miner.cpp +++ b/libethereum/Miner.cpp @@ -36,10 +36,9 @@ LocalMiner::LocalMiner(MinerHost* _host, unsigned _id): { } -void LocalMiner::setup(MinerHost* _host, unsigned _id, StructuredLogger const* _structuredLogger) +void LocalMiner::setup(MinerHost* _host, unsigned _id) { m_host = _host; - m_structuredLogger = _structuredLogger; setName("miner-" + toString(_id)); } @@ -80,7 +79,7 @@ void LocalMiner::doWork() } if (mineInfo.completed) { - m_mineState.completeMine(m_structuredLogger); + m_mineState.completeMine(); m_host->onComplete(); m_miningStatus = Mined; } diff --git a/libethereum/Miner.h b/libethereum/Miner.h index c8f9691f4..5914770d2 100644 --- a/libethereum/Miner.h +++ b/libethereum/Miner.h @@ -33,7 +33,6 @@ namespace dev { -class StructuredLogger; namespace eth { @@ -106,7 +105,7 @@ public: ~LocalMiner() { stop(); } /// Setup its basics. - void setup(MinerHost* _host, unsigned _id = 0, StructuredLogger const* _structuredLogger = nullptr); + void setup(MinerHost* _host, unsigned _id = 0); /// Start mining. void start() { startWorking(); } @@ -145,7 +144,6 @@ private: mutable std::mutex x_mineInfo; ///< Lock for the mining progress & history. MineProgress m_mineProgress; ///< What's our progress? std::list m_mineHistory; ///< What the history of our mining? - StructuredLogger const* m_structuredLogger; }; } diff --git a/libethereum/State.cpp b/libethereum/State.cpp index edaa3a6dc..0fd94175c 100644 --- a/libethereum/State.cpp +++ b/libethereum/State.cpp @@ -802,12 +802,12 @@ bool State::completeMine(h256 const& _nonce) m_currentBlock.nonce = _nonce; cnote << "Completed" << m_currentBlock.headerHash(WithoutNonce).abridged() << m_currentBlock.nonce.abridged() << m_currentBlock.difficulty << ProofOfWork::verify(m_currentBlock.headerHash(WithoutNonce), m_currentBlock.nonce, m_currentBlock.difficulty); - completeMine(nullptr); + completeMine(); return true; } -void State::completeMine(StructuredLogger const* _structuredLogger) +void State::completeMine() { cdebug << "Completing mine!"; // Got it! @@ -821,13 +821,12 @@ void State::completeMine(StructuredLogger const* _structuredLogger) ret.swapOut(m_currentBytes); m_currentBlock.hash = sha3(RLP(m_currentBytes)[0].data()); cnote << "Mined " << m_currentBlock.hash.abridged() << "(parent: " << m_currentBlock.parentHash.abridged() << ")"; - if (_structuredLogger) - _structuredLogger->logMinedNewBlock( - m_currentBlock.hash.abridged(), - m_currentBlock.nonce.abridged(), - "", //TODO: chain head hash here ?? - m_currentBlock.parentHash.abridged() - ); + StructLog.minedNewBlock( + m_currentBlock.hash.abridged(), + m_currentBlock.nonce.abridged(), + "", //TODO: chain head hash here ?? + m_currentBlock.parentHash.abridged() + ); // Quickly reset the transactions. // TODO: Leave this in a better state than this limbo, or at least record that it's in limbo. diff --git a/libethereum/State.h b/libethereum/State.h index cd1048d60..813141d17 100644 --- a/libethereum/State.h +++ b/libethereum/State.h @@ -41,8 +41,6 @@ namespace dev { -class StructuredLogger; - namespace test { class ImportTest; } namespace eth @@ -141,7 +139,7 @@ public: * // unlock * @endcode */ - void completeMine(StructuredLogger const* _structuredLogger = nullptr); + void completeMine(); /// Get the complete current block, including valid nonce. /// Only valid after mine() returns true. diff --git a/libp2p/Host.cpp b/libp2p/Host.cpp index ffc726db8..aa8b64f3c 100644 --- a/libp2p/Host.cpp +++ b/libp2p/Host.cpp @@ -27,6 +27,7 @@ #include #include #include +#include #include #include #include "Session.h" @@ -45,7 +46,7 @@ void HostNodeTableHandler::processEvent(NodeId const& _n, NodeTableEventType con m_host.onNodeTableEvent(_n, _e); } -Host::Host(std::string const& _clientVersion, NetworkPreferences const& _n, bytesConstRef _restoreNetwork, StructuredLogger const& _structuredLogger): +Host::Host(std::string const& _clientVersion, NetworkPreferences const& _n, bytesConstRef _restoreNetwork): Worker("p2p", 0), m_restoreNetwork(_restoreNetwork.toBytes()), m_clientVersion(_clientVersion), @@ -54,8 +55,7 @@ Host::Host(std::string const& _clientVersion, NetworkPreferences const& _n, byte m_ioService(2), m_tcp4Acceptor(m_ioService), m_alias(networkAlias(_restoreNetwork)), - m_lastPing(chrono::steady_clock::time_point::min()), - m_structuredLogger(_structuredLogger) + m_lastPing(chrono::steady_clock::time_point::min()) { for (auto address: m_ifAddresses) if (address.is_v4()) @@ -159,7 +159,7 @@ void Host::registerPeer(std::shared_ptr _s, CapDescs const& _caps) { { clog(NetNote) << "p2p.host.peer.register" << _s->m_peer->id.abridged(); - m_structuredLogger.logP2PConnected( + StructLog.p2pConnected( _s->m_peer->id.abridged(), _s->m_peer->peerEndpoint(), _s->m_peer->m_lastConnected, _s->m_info.clientVersion, diff --git a/libp2p/Host.h b/libp2p/Host.h index de984ca59..6f5c5a50c 100644 --- a/libp2p/Host.h +++ b/libp2p/Host.h @@ -33,7 +33,6 @@ #include #include #include -#include #include #include "NodeTable.h" #include "HostCapability.h" @@ -87,7 +86,7 @@ class Host: public Worker public: /// Start server, listening for connections on the given port. Host(std::string const& _clientVersion, NetworkPreferences const& _n = NetworkPreferences(), - bytesConstRef _restoreNetwork = bytesConstRef(), StructuredLogger const& _structuredLogger = StructuredLogger()); + bytesConstRef _restoreNetwork = bytesConstRef()); /// Will block on network process events. virtual ~Host(); @@ -234,7 +233,6 @@ private: std::map> m_capabilities; ///< Each of the capabilities we support. std::chrono::steady_clock::time_point m_lastPing; ///< Time we sent the last ping to all peers. - StructuredLogger const& m_structuredLogger; bool m_accepting = false; }; diff --git a/libp2p/Session.cpp b/libp2p/Session.cpp index 78caa6273..9817cb5f9 100644 --- a/libp2p/Session.cpp +++ b/libp2p/Session.cpp @@ -24,6 +24,7 @@ #include #include #include +#include #include #include "Host.h" #include "Capability.h" @@ -467,8 +468,10 @@ void Session::drop(DisconnectReason _reason) void Session::disconnect(DisconnectReason _reason) { clogS(NetConnect) << "Disconnecting (our reason:" << reasonOf(_reason) << ")"; - m_server->m_structuredLogger.logP2PDisconnected(m_info.id.abridged(), m_peer->peerEndpoint(), - 0);// TODO: num connections + StructLog.p2pDisconnected( + m_info.id.abridged(), + m_peer->peerEndpoint(), + 0);// TODO: num connections if (m_socket.is_open()) { RLPStream s; diff --git a/libwebthree/WebThree.cpp b/libwebthree/WebThree.cpp index 50e988932..c97e4b5c8 100644 --- a/libwebthree/WebThree.cpp +++ b/libwebthree/WebThree.cpp @@ -37,14 +37,14 @@ using namespace dev::shh; WebThreeDirect::WebThreeDirect(std::string const& _clientVersion, std::string const& _dbPath, bool _forceClean, std::set const& _interfaces, NetworkPreferences const& _n, - bytesConstRef _network, int _miners, StructuredLogger const& _structuredLogger): + bytesConstRef _network, int _miners): m_clientVersion(_clientVersion), - m_net(_clientVersion, _n, _network, _structuredLogger) + m_net(_clientVersion, _n, _network) { if (_dbPath.size()) Defaults::setDBPath(_dbPath); if (_interfaces.count("eth")) - m_ethereum.reset(new eth::Client(&m_net, _dbPath, _forceClean, 0, _miners, _structuredLogger)); + m_ethereum.reset(new eth::Client(&m_net, _dbPath, _forceClean, 0, _miners)); if (_interfaces.count("shh")) m_whisper = m_net.registerCapability(new WhisperHost); diff --git a/libwebthree/WebThree.h b/libwebthree/WebThree.h index 197181335..9eb9111b4 100644 --- a/libwebthree/WebThree.h +++ b/libwebthree/WebThree.h @@ -106,7 +106,7 @@ public: WebThreeDirect(std::string const& _clientVersion, std::string const& _dbPath, bool _forceClean = false, std::set const& _interfaces = {"eth", "shh"}, p2p::NetworkPreferences const& _n = p2p::NetworkPreferences(), - bytesConstRef _network = bytesConstRef(), int _miners = -1, StructuredLogger const& _structuredLogger = StructuredLogger()); + bytesConstRef _network = bytesConstRef(), int _miners = -1); /// Destructor. ~WebThreeDirect();