mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Inject journals:
Calls to WriteLog are replaced with injected journals
This commit is contained in:
@@ -119,7 +119,7 @@ error_code_i fillHandler (Context& context,
|
||||
int jc = context.app.getJobQueue ().getJobCountGE (jtCLIENT);
|
||||
if (jc > Tuning::maxJobQueueClients)
|
||||
{
|
||||
WriteLog (lsDEBUG, RPCHandler) << "Too busy for command: " << jc;
|
||||
JLOG (context.j.debug) << "Too busy for command: " << jc;
|
||||
return rpcTOO_BUSY;
|
||||
}
|
||||
}
|
||||
@@ -129,8 +129,8 @@ error_code_i fillHandler (Context& context,
|
||||
|
||||
std::string strCommand = context.params[jss::command].asString ();
|
||||
|
||||
WriteLog (lsTRACE, RPCHandler) << "COMMAND:" << strCommand;
|
||||
WriteLog (lsTRACE, RPCHandler) << "REQUEST:" << context.params;
|
||||
JLOG (context.j.trace) << "COMMAND:" << strCommand;
|
||||
JLOG (context.j.trace) << "REQUEST:" << context.params;
|
||||
|
||||
auto handler = getHandler(strCommand);
|
||||
|
||||
@@ -143,7 +143,7 @@ error_code_i fillHandler (Context& context,
|
||||
if ((handler->condition_ & NEEDS_NETWORK_CONNECTION) &&
|
||||
(context.netOps.getOperatingMode () < NetworkOPs::omSYNCING))
|
||||
{
|
||||
WriteLog (lsINFO, RPCHandler)
|
||||
JLOG (context.j.info)
|
||||
<< "Insufficient network mode for RPC: "
|
||||
<< context.netOps.strOperatingMode ();
|
||||
|
||||
@@ -164,7 +164,7 @@ error_code_i fillHandler (Context& context,
|
||||
|
||||
if (cID + 10 < vID)
|
||||
{
|
||||
WriteLog (lsDEBUG, RPCHandler) << "Current ledger ID(" << cID <<
|
||||
JLOG (context.j.debug) << "Current ledger ID(" << cID <<
|
||||
") is less than validated ledger ID(" << vID << ")";
|
||||
return rpcNO_CURRENT;
|
||||
}
|
||||
@@ -192,7 +192,7 @@ Status callMethod (
|
||||
}
|
||||
catch (std::exception& e)
|
||||
{
|
||||
WriteLog (lsINFO, RPCHandler) << "Caught throw: " << e.what ();
|
||||
JLOG (context.j.info) << "Caught throw: " << e.what ();
|
||||
|
||||
if (context.loadType == Resource::feeReferenceRPC)
|
||||
context.loadType = Resource::feeExceptionRPC;
|
||||
@@ -209,7 +209,7 @@ void getResult (
|
||||
auto&& result = Json::addObject (object, jss::result);
|
||||
if (auto status = callMethod (context, method, name, result))
|
||||
{
|
||||
WriteLog (lsDEBUG, RPCErr) << "rpcError: " << status.toString();
|
||||
JLOG (context.j.debug) << "rpcError: " << status.toString();
|
||||
result[jss::status] = jss::error;
|
||||
result[jss::request] = context.params;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user