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

@@ -8,7 +8,7 @@ SETUP_LOG (WalletAddTransactor)
TER WalletAddTransactor::doApply ()
{
std::cerr << "WalletAdd>" << std::endl;
Log::out() << "WalletAdd>";
Blob const vucPubKey = mTxn.getFieldVL (sfPublicKey);
Blob const vucSignature = mTxn.getFieldVL (sfSignature);
@@ -28,7 +28,7 @@ TER WalletAddTransactor::doApply ()
// FIXME: This should be moved to the transaction's signature check logic and cached
if (!naMasterPubKey.accountPublicVerify (Serializer::getSHA512Half (uAuthKeyID.begin (), uAuthKeyID.size ()), vucSignature))
{
std::cerr << "WalletAdd: unauthorized: bad signature " << std::endl;
Log::out() << "WalletAdd: unauthorized: bad signature ";
return tefBAD_ADD_AUTH;
}
@@ -37,7 +37,7 @@ TER WalletAddTransactor::doApply ()
if (sleDst)
{
std::cerr << "WalletAdd: account already created" << std::endl;
Log::out() << "WalletAdd: account already created";
return tefCREATED;
}
@@ -71,7 +71,7 @@ TER WalletAddTransactor::doApply ()
sleDst->setFieldAmount (sfBalance, saDstAmount);
sleDst->setFieldAccount (sfRegularKey, uAuthKeyID);
std::cerr << "WalletAdd<" << std::endl;
Log::out() << "WalletAdd<";
return tesSUCCESS;
}