From aa8211e60b8d6ec218e1ab9e684e5ce178ebf750 Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Sun, 28 Oct 2012 19:48:46 -0700 Subject: [PATCH] Logging updates. --- src/RPCHandler.cpp | 6 +++--- src/rpc.cpp | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/RPCHandler.cpp b/src/RPCHandler.cpp index c6c8e9dba..2b8fe7225 100644 --- a/src/RPCHandler.cpp +++ b/src/RPCHandler.cpp @@ -216,7 +216,7 @@ Json::Value RPCHandler::authorize(const uint256& uLedger, { naMasterAccountPublic.setAccountPublic(naMasterGenerator, iIndex); - Log(lsDEBUG) << "authorize: " << iIndex << " : " << naMasterAccountPublic.humanAccountID() << " : " << naSrcAccountID.humanAccountID(); + cLog(lsDEBUG) << "authorize: " << iIndex << " : " << naMasterAccountPublic.humanAccountID() << " : " << naSrcAccountID.humanAccountID(); bFound = naSrcAccountID.getAccountID() == naMasterAccountPublic.getAccountID(); if (!bFound) @@ -247,7 +247,7 @@ Json::Value RPCHandler::authorize(const uint256& uLedger, if (saSrcBalance < saFee) { - Log(lsINFO) << "authorize: Insufficent funds for fees: fee=" << saFee.getText() << " balance=" << saSrcBalance.getText(); + cLog(lsINFO) << "authorize: Insufficent funds for fees: fee=" << saFee.getText() << " balance=" << saSrcBalance.getText(); return rpcError(rpcINSUF_FUNDS); } @@ -2410,7 +2410,7 @@ Json::Value RPCHandler::doLogRotate(const Json::Value& params) Json::Value RPCHandler::doCommand(const std::string& command, Json::Value& params,int role) { - Log(lsTRACE) << "RPC:" << command; + cLog(lsTRACE) << "RPC:" << command; static struct { const char* pCommand; diff --git a/src/rpc.cpp b/src/rpc.cpp index 281c68e10..15f53061c 100644 --- a/src/rpc.cpp +++ b/src/rpc.cpp @@ -17,6 +17,8 @@ #include "Log.h" #include "Version.h" +SETUP_LOG(); + using namespace boost; using namespace boost::asio; @@ -69,7 +71,7 @@ std::string rfc1123Time() std::string HTTPReply(int nStatus, const std::string& strMsg) { - Log(lsTRACE) << "HTTP Reply " << nStatus << " " << strMsg; + cLog(lsTRACE) << "HTTP Reply " << nStatus << " " << strMsg; if (nStatus == 401) return strprintf("HTTP/1.0 401 Authorization Required\r\n"