mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Reduce log chattiness.
This commit is contained in:
@@ -506,7 +506,7 @@ void LedgerConsensus::startAcquiring(TransactionAcquire::pointer acquire)
|
||||
|
||||
void LedgerConsensus::propose(const std::vector<uint256>& added, const std::vector<uint256>& removed)
|
||||
{
|
||||
Log(lsDEBUG) << "We propose: " << mOurPosition->getCurrentHash().GetHex();
|
||||
Log(lsTRACE) << "We propose: " << mOurPosition->getCurrentHash().GetHex();
|
||||
newcoin::TMProposeSet prop;
|
||||
prop.set_currenttxhash(mOurPosition->getCurrentHash().begin(), 256 / 8);
|
||||
prop.set_proposeseq(mOurPosition->getProposeSeq());
|
||||
@@ -643,7 +643,7 @@ void LedgerConsensus::applyTransaction(TransactionEngine& engine, SerializedTran
|
||||
}
|
||||
else if (result == 0)
|
||||
{
|
||||
Log(lsDEBUG) << " success";
|
||||
Log(lsTRACE) << " success";
|
||||
assert(ledger->hasTransaction(txn->getTransactionID()));
|
||||
}
|
||||
else
|
||||
@@ -729,7 +729,7 @@ void LedgerConsensus::accept(SHAMap::pointer set)
|
||||
Log(lsTRACE) << "newLCL before transactions";
|
||||
Json::Value p;
|
||||
newLCL->addJson(p, LEDGER_JSON_DUMP_TXNS | LEDGER_JSON_DUMP_STATE);
|
||||
ssw.write(std::cerr, p);
|
||||
ssw.write(Log(lsTRACE).ref(), p);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -747,7 +747,7 @@ void LedgerConsensus::accept(SHAMap::pointer set)
|
||||
Log(lsTRACE) << "newLCL after transactions";
|
||||
Json::Value p;
|
||||
newLCL->addJson(p, LEDGER_JSON_DUMP_TXNS | LEDGER_JSON_DUMP_STATE);
|
||||
ssw.write(std::cerr, p);
|
||||
ssw.write(Log(lsTRACE).ref(), p);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -759,14 +759,14 @@ void LedgerConsensus::accept(SHAMap::pointer set)
|
||||
Log(lsTRACE) << "newOL before transactions";
|
||||
Json::Value p;
|
||||
newOL->addJson(p, LEDGER_JSON_DUMP_TXNS | LEDGER_JSON_DUMP_STATE);
|
||||
ssw.write(std::cerr, p);
|
||||
ssw.write(Log(lsTRACE).ref(), p);
|
||||
}
|
||||
if (1)
|
||||
{
|
||||
Log(lsTRACE) << "current ledger";
|
||||
Json::Value p;
|
||||
theApp->getMasterLedger().getCurrentLedger()->addJson(p, LEDGER_JSON_DUMP_TXNS | LEDGER_JSON_DUMP_STATE);
|
||||
ssw.write(std::cerr, p);
|
||||
ssw.write(Log(lsTRACE).ref(), p);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -804,7 +804,7 @@ void LedgerConsensus::accept(SHAMap::pointer set)
|
||||
Log(lsTRACE) << "newOL after current ledger transactions";
|
||||
Json::Value p;
|
||||
newOL->addJson(p, LEDGER_JSON_DUMP_TXNS | LEDGER_JSON_DUMP_STATE);
|
||||
ssw.write(std::cerr, p);
|
||||
ssw.write(Log(lsTRACE).ref(), p);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "AccountState.h"
|
||||
#include "NicknameState.h"
|
||||
#include "utils.h"
|
||||
#include "Log.h"
|
||||
|
||||
RPCServer::RPCServer(boost::asio::io_service& io_service , NetworkOPs* nopNetwork)
|
||||
: mNetOps(nopNetwork), mSocket(io_service)
|
||||
@@ -162,16 +163,10 @@ std::string RPCServer::handleRequest(const std::string& requestStr)
|
||||
else if (!valParams.isArray())
|
||||
return(HTTPReply(400, ""));
|
||||
|
||||
#ifdef DEBUG
|
||||
Json::StyledStreamWriter w;
|
||||
w.write(std::cerr, valParams);
|
||||
#endif
|
||||
|
||||
w.write(Log(lsTRACE).ref(), valParams);
|
||||
Json::Value result(doCommand(strMethod, valParams));
|
||||
|
||||
#ifdef DEBUG
|
||||
w.write(std::cerr, result);
|
||||
#endif
|
||||
w.write(Log(lsTRACE).ref(), result);
|
||||
|
||||
std::string strReply = JSONRPCReply(result, Json::Value(), id);
|
||||
return( HTTPReply(200, strReply) );
|
||||
@@ -1966,7 +1961,7 @@ Json::Value RPCServer::doStop(Json::Value& params) {
|
||||
|
||||
Json::Value RPCServer::doCommand(const std::string& command, Json::Value& params)
|
||||
{
|
||||
std::cerr << "RPC:" << command << std::endl;
|
||||
Log(lsTRACE) << "RPC:" << command;
|
||||
|
||||
static struct {
|
||||
const char* pCommand;
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
#include "RPC.h"
|
||||
#include "BitcoinUtil.h"
|
||||
#include "Config.h"
|
||||
#include "Log.h"
|
||||
|
||||
using namespace boost;
|
||||
using namespace boost::asio;
|
||||
@@ -71,7 +72,7 @@ std::string rfc1123Time()
|
||||
|
||||
std::string HTTPReply(int nStatus, const std::string& strMsg)
|
||||
{
|
||||
std::cout << "HTTP Reply " << nStatus << " " << strMsg << std::endl;
|
||||
Log(lsTRACE) << "HTTP Reply " << nStatus << " " << strMsg;
|
||||
|
||||
if (nStatus == 401)
|
||||
return strprintf("HTTP/1.0 401 Authorization Required\r\n"
|
||||
|
||||
Reference in New Issue
Block a user