mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-01-27 13:14:15 +00:00
* sane log messages: AddressBook.cpp
This commit is contained in:
parent
489e37b2a1
commit
8170257c26
@ -152,10 +152,10 @@ namespace client
|
|||||||
num++;
|
num++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LogPrint (eLogInfo, num, " addresses loaded");
|
LogPrint (eLogInfo, "Addressbook: ", num, " addresses loaded");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
LogPrint (eLogWarning, filename, " not found");
|
LogPrint (eLogWarning, "Addressbook: ", filename, " not found");
|
||||||
return num;
|
return num;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -171,7 +171,7 @@ namespace client
|
|||||||
f << it.first << "," << it.second.ToBase32 () << std::endl;
|
f << it.first << "," << it.second.ToBase32 () << std::endl;
|
||||||
num++;
|
num++;
|
||||||
}
|
}
|
||||||
LogPrint (eLogInfo, num, " addresses saved");
|
LogPrint (eLogInfo, "Addressbook: ", num, " addresses saved");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
LogPrint (eLogError, "Can't open file ", filename);
|
LogPrint (eLogError, "Can't open file ", filename);
|
||||||
@ -290,7 +290,7 @@ namespace client
|
|||||||
m_Storage = CreateStorage ();
|
m_Storage = CreateStorage ();
|
||||||
m_Storage->AddAddress (ident);
|
m_Storage->AddAddress (ident);
|
||||||
m_Addresses[address] = ident->GetIdentHash ();
|
m_Addresses[address] = ident->GetIdentHash ();
|
||||||
LogPrint (address,"->", ToAddress(ident->GetIdentHash ()), " added");
|
LogPrint (eLogInfo, "Addressbook: ", address,"->", ToAddress(ident->GetIdentHash ()), " added");
|
||||||
}
|
}
|
||||||
|
|
||||||
void AddressBook::InsertAddress (std::shared_ptr<const i2p::data::IdentityEx> address)
|
void AddressBook::InsertAddress (std::shared_ptr<const i2p::data::IdentityEx> address)
|
||||||
@ -476,7 +476,7 @@ namespace client
|
|||||||
void AddressBookSubscription::Request ()
|
void AddressBookSubscription::Request ()
|
||||||
{
|
{
|
||||||
// must be run in separate thread
|
// must be run in separate thread
|
||||||
LogPrint (eLogInfo, "Downloading hosts from ", m_Link, " ETag: ", m_Etag, " Last-Modified: ", m_LastModified);
|
LogPrint (eLogInfo, "Downloading hosts database from ", m_Link, " ETag: ", m_Etag, " Last-Modified: ", m_LastModified);
|
||||||
bool success = false;
|
bool success = false;
|
||||||
i2p::util::http::url u (m_Link);
|
i2p::util::http::url u (m_Link);
|
||||||
i2p::data::IdentHash ident;
|
i2p::data::IdentHash ident;
|
||||||
@ -591,7 +591,10 @@ namespace client
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
LogPrint (eLogError, "Can't resolve ", u.host_);
|
LogPrint (eLogError, "Can't resolve ", u.host_);
|
||||||
LogPrint (eLogInfo, "Download complete ", success ? "Success" : "Failed");
|
|
||||||
|
if (!success)
|
||||||
|
LogPrint (eLogError, "Addressbook download failed");
|
||||||
|
|
||||||
m_Book.DownloadComplete (success);
|
m_Book.DownloadComplete (success);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user