Improve Journal logging framework:

* Allow partition log levels to be adjusted
* Cleanups
This commit is contained in:
Howard Hinnant
2014-06-12 20:49:37 -07:00
committed by Nik Bougalis
parent 488a44b88e
commit 23dc08c925
107 changed files with 751 additions and 1553 deletions

View File

@@ -17,6 +17,8 @@
*/
//==============================================================================
#include <beast/module/core/memory/SharedSingleton.h>
namespace ripple {
LedgerFormats::LedgerFormats ()

View File

@@ -21,8 +21,6 @@
namespace ripple {
SETUP_LOG (RippleAddress)
RippleAddress::RippleAddress ()
: mIsValid (false)
{
@@ -807,7 +805,6 @@ bool RippleAddress::setSeedGeneric (const std::string& strText)
}
else
{
// Log::out() << "Creating seed from pass phrase.";
setSeed (CKey::PassPhraseToKey (strText));
}

View File

@@ -21,8 +21,6 @@
namespace ripple {
SETUP_LOG (STAmount)
std::uint64_t STAmount::uRateOne = STAmount::getRate (STAmount (1), STAmount (1));
bool STAmount::issuerFromString (uint160& uDstIssuer, const std::string& sIssuer)
@@ -67,7 +65,6 @@ bool STAmount::currencyFromString (uint160& uDstCurrency, const std::string& sCu
// std::string sIso;
// sIso.assign(vucIso.begin(), vucIso.end());
// Log::out() << "currency: " << sIso;
Serializer s;

View File

@@ -19,8 +19,6 @@
namespace ripple {
SETUP_LOG (STObject)
std::unique_ptr<SerializedType> STObject::makeDefaultObject (SerializedTypeID id, SField::ref name)
{
assert ((id == STI_NOTPRESENT) || (id == name.fieldType));
@@ -1110,7 +1108,7 @@ bool STObject::operator== (const STObject& obj) const
if (!match)
{
Log (lsTRACE) << "STObject::operator==: no match for " << t.getFName ().getName ();
WriteLog (lsTRACE, STObject) << "STObject::operator==: no match for " << t.getFName ().getName ();
return false;
}
}
@@ -1123,7 +1121,7 @@ bool STObject::operator== (const STObject& obj) const
if (fields != matches)
{
Log (lsTRACE) << "STObject::operator==: " << fields << " fields, " << matches << " matches";
WriteLog (lsTRACE, STObject) << "STObject::operator==: " << fields << " fields, " << matches << " matches";
return false;
}

View File

@@ -19,8 +19,6 @@
namespace ripple {
SETUP_LOG (SerializedType)
const STAmount saZero (CURRENCY_ONE, ACCOUNT_ONE, 0);
const STAmount saOne (CURRENCY_ONE, ACCOUNT_ONE, 1);
@@ -46,40 +44,6 @@ bool SerializedType::isEquivalent (const SerializedType& t) const
return false;
}
void STPathSet::printDebug ()
{
// VFALCO NOTE Can't use Log::out() because of std::endl
//
for (int i = 0; i < value.size (); i++)
{
std::cerr << i << ": ";
for (int j = 0; j < value[i].mPath.size (); j++)
{
//STPathElement pe = value[i].mPath[j];
RippleAddress nad;
nad.setAccountID (value[i].mPath[j].mAccountID);
std::cerr << " " << nad.humanAccountID ();
//std::cerr << " " << pe.mAccountID.GetHex();
}
std::cerr << std::endl;
}
}
void STPath::printDebug ()
{
Log::out() << "STPath:";
for (int i = 0; i < mPath.size (); i++)
{
RippleAddress nad;
nad.setAccountID (mPath[i].mAccountID);
Log::out() << " " << i << ": " << nad.humanAccountID ();
}
}
std::string SerializedType::getFullText () const
{
std::string ret;

View File

@@ -1305,7 +1305,6 @@ public:
;
}
void printDebug ();
int size () const
{
return mPath.size ();
@@ -1493,8 +1492,6 @@ public:
return value.empty ();
}
void printDebug ();
STPath& operator[](size_t n)
{
return value[n];

View File

@@ -21,8 +21,6 @@
namespace ripple {
SETUP_LOG (Serializer)
int Serializer::addZeros (size_t uBytes)
{
int ret = mData.size ();