Replace printf with LogPrintf / LogPrint

This commit is contained in:
Gavin Andresen
2013-09-18 20:38:08 +10:00
parent e51321fb75
commit 881a85a22d
29 changed files with 374 additions and 392 deletions

View File

@@ -76,7 +76,7 @@ std::string CUnsignedAlert::ToString() const
void CUnsignedAlert::print() const
{
printf("%s", ToString().c_str());
LogPrintf("%s", ToString().c_str());
}
void CAlert::SetNull()
@@ -200,13 +200,13 @@ bool CAlert::ProcessAlert(bool fThread)
const CAlert& alert = (*mi).second;
if (Cancels(alert))
{
printf("cancelling alert %d\n", alert.nID);
LogPrint("alert", "cancelling alert %d\n", alert.nID);
uiInterface.NotifyAlertChanged((*mi).first, CT_DELETED);
mapAlerts.erase(mi++);
}
else if (!alert.IsInEffect())
{
printf("expiring alert %d\n", alert.nID);
LogPrint("alert", "expiring alert %d\n", alert.nID);
uiInterface.NotifyAlertChanged((*mi).first, CT_DELETED);
mapAlerts.erase(mi++);
}
@@ -220,7 +220,7 @@ bool CAlert::ProcessAlert(bool fThread)
const CAlert& alert = item.second;
if (alert.Cancels(*this))
{
printf("alert already cancelled by %d\n", alert.nID);
LogPrint("alert", "alert already cancelled by %d\n", alert.nID);
return false;
}
}
@@ -258,6 +258,6 @@ bool CAlert::ProcessAlert(bool fThread)
}
}
printf("accepted alert %d, AppliesToMe()=%d\n", nID, AppliesToMe());
LogPrint("alert", "accepted alert %d, AppliesToMe()=%d\n", nID, AppliesToMe());
return true;
}