Streamline Log with print() and out()

This commit is contained in:
Vinnie Falco
2013-06-30 12:11:42 -07:00
parent c35c52ff08
commit b52bbccd8a
25 changed files with 174 additions and 81 deletions

View File

@@ -277,7 +277,7 @@ bool checkECIES (void)
if ((i % 100) == 0)
{
// generate new keys every 100 times
// std::cerr << "new keys" << std::endl;
// Log::out() << "new keys";
senderPriv.MakeNewKey ();
recipientPriv.MakeNewKey ();
@@ -307,7 +307,7 @@ bool checkECIES (void)
return false;
}
// std::cerr << "Msg(" << msglen << ") ok " << ciphertext.size() << std::endl;
//Log::out() << "Msg(" << msglen << ") ok " << ciphertext.size();
}
return true;

View File

@@ -19,7 +19,7 @@ PackedMessage::PackedMessage (::google::protobuf::Message const& message, int ty
message.SerializeToArray (&mBuffer [PackedMessage::kHeaderBytes], messageBytes);
#ifdef BEAST_DEBUG
// std::cerr << "PackedMessage: type=" << type << ", datalen=" << msg_size << std::endl;
//Log::out() << "PackedMessage: type=" << type << ", datalen=" << msg_size;
#endif
}
}

View File

@@ -814,17 +814,17 @@ bool RippleAddress::setSeedGeneric (const std::string& strText)
}
else if (setSeed (strText))
{
// std::cerr << "Recognized seed." << std::endl;
// Log::out() << "Recognized seed.";
nothing ();
}
else if (1 == setSeed1751 (strText))
{
// std::cerr << "Recognized 1751 seed." << std::endl;
// Log::out() << "Recognized 1751 seed.";
nothing ();
}
else
{
// std::cerr << "Creating seed from pass phrase." << std::endl;
// Log::out() << "Creating seed from pass phrase.";
setSeed (CKey::PassPhraseToKey (strText));
}

View File

@@ -50,7 +50,7 @@ bool STAmount::currencyFromString (uint160& uDstCurrency, const std::string& sCu
// std::string sIso;
// sIso.assign(vucIso.begin(), vucIso.end());
// std::cerr << "currency: " << sIso << std::endl;
// Log::out() << "currency: " << sIso;
Serializer s;

View File

@@ -25,6 +25,8 @@ SerializedType& SerializedType::operator= (const SerializedType& t)
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 << ": ";
@@ -45,13 +47,13 @@ void STPathSet::printDebug ()
void STPath::printDebug ()
{
std::cerr << "STPath:" << std::endl;
Log::out() << "STPath:";
for (int i = 0; i < mPath.size (); i++)
{
RippleAddress nad;
nad.setAccountID (mPath[i].mAccountID);
std::cerr << " " << i << ": " << nad.humanAccountID () << std::endl;
Log::out() << " " << i << ": " << nad.humanAccountID ();
}
}