linuxdcpp-team team mailing list archive
-
linuxdcpp-team team
-
Mailing list archive
-
Message #03573
[Branch ~dcplusplus-team/dcplusplus/trunk] Rev 2453: Finished downloads log
------------------------------------------------------------
revno: 2453
committer: eMTee <emtee11@xxxxxxxxx>
branch nick: dcplusplus
timestamp: Thu 2011-03-10 21:27:58 +0100
message:
Finished downloads log
modified:
changelog.txt
dcpp/ClientManager.h
dcpp/FinishedItem.cpp
dcpp/FinishedItem.h
dcpp/FinishedManager.cpp
dcpp/LogManager.cpp
dcpp/LogManager.h
dcpp/QueueManager.cpp
dcpp/QueueManager.h
dcpp/SettingsManager.cpp
dcpp/SettingsManager.h
dcpp/Transfer.cpp
help/settings_logs.html
help/style.css
win32/LogPage.cpp
--
lp:dcplusplus
https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk
Your team Dcplusplus-team is subscribed to branch lp:dcplusplus.
To unsubscribe from this branch go to https://code.launchpad.net/~dcplusplus-team/dcplusplus/trunk/+edit-subscription
=== modified file 'changelog.txt'
--- changelog.txt 2011-03-10 18:29:54 +0000
+++ changelog.txt 2011-03-10 20:27:58 +0000
@@ -8,6 +8,7 @@
* Repurpose Ctrl+F to in-place searches in chat windows & file lists (poy)
* Better splitter resizing
* [L#730828] Prevent a stack overflow when searching within too big file lists (poy)
+* [L#710359] Add finished downloads log (emtee)
-- 0.782 2011-03-05 --
* Prevent a remote crash triggered via malformed user commands (poy)
=== modified file 'dcpp/ClientManager.h'
--- dcpp/ClientManager.h 2011-02-19 22:27:39 +0000
+++ dcpp/ClientManager.h 2011-03-10 20:27:58 +0000
@@ -57,6 +57,7 @@
StringList getNicks(const HintedUser& user) { return getNicks(user.user->getCID(), user.hint); }
StringList getHubNames(const HintedUser& user) { return getHubNames(user.user->getCID(), user.hint); }
+ StringList getHubs(const HintedUser& user) { return getHubs(user.user->getCID(), user.hint); }
vector<Identity> getIdentities(const UserPtr &u) const;
=== modified file 'dcpp/FinishedItem.cpp'
--- dcpp/FinishedItem.cpp 2011-01-02 17:12:02 +0000
+++ dcpp/FinishedItem.cpp 2011-03-10 20:27:58 +0000
@@ -56,11 +56,13 @@
int64_t milliSeconds_,
time_t time_,
int64_t fileSize_,
+ int64_t actual_,
bool crc32Checked_,
const HintedUser& user
) :
FinishedItemBase(transferred_, milliSeconds_, time_),
fileSize(fileSize_),
+actual(actual_),
crc32Checked(crc32Checked_)
{
users.push_back(user);
@@ -70,12 +72,15 @@
int64_t transferred_,
int64_t milliSeconds_,
time_t time_,
+ int64_t actual_,
bool crc32Checked_,
const HintedUser& user
)
{
FinishedItemBase::update(transferred_, milliSeconds_, time_);
+ actual += actual_;
+
if(crc32Checked_)
crc32Checked = true;
=== modified file 'dcpp/FinishedItem.h'
--- dcpp/FinishedItem.h 2011-03-08 22:48:55 +0000
+++ dcpp/FinishedItem.h 2011-03-10 20:27:58 +0000
@@ -54,6 +54,7 @@
int64_t milliSeconds_,
time_t time_,
int64_t fileSize_,
+ int64_t actual_,
bool crc32Checked_,
const HintedUser& user
);
@@ -62,6 +63,7 @@
int64_t transferred_,
int64_t milliSeconds_,
time_t time_,
+ int64_t actual_,
bool crc32Checked_,
const HintedUser& user
);
@@ -71,6 +73,7 @@
GETSET(HintedUserList, users, Users);
GETSET(int64_t, fileSize, FileSize);
+ GETSET(int64_t, actual, Actual);
GETSET(bool, crc32Checked, Crc32Checked);
};
=== modified file 'dcpp/FinishedManager.cpp'
--- dcpp/FinishedManager.cpp 2011-01-29 14:15:43 +0000
+++ dcpp/FinishedManager.cpp 2011-03-10 20:27:58 +0000
@@ -141,6 +141,7 @@
milliSeconds,
time,
upload ? File::getSize(file) : size,
+ t->getActual(),
crc32Checked,
user
);
@@ -151,6 +152,7 @@
crc32Checked ? 0 : t->getPos(), // in case of a successful crc check at the end we want to update the status only
milliSeconds,
time,
+ t->getActual(),
crc32Checked,
user
);
=== modified file 'dcpp/LogManager.cpp'
--- dcpp/LogManager.cpp 2011-01-02 17:12:02 +0000
+++ dcpp/LogManager.cpp 2011-03-10 20:27:58 +0000
@@ -87,6 +87,8 @@
options[UPLOAD][FORMAT] = SettingsManager::LOG_FORMAT_POST_UPLOAD;
options[DOWNLOAD][FILE] = SettingsManager::LOG_FILE_DOWNLOAD;
options[DOWNLOAD][FORMAT] = SettingsManager::LOG_FORMAT_POST_DOWNLOAD;
+ options[FINISHED_DOWNLOAD][FILE] = SettingsManager::LOG_FILE_FINISHED_DOWNLOAD;
+ options[FINISHED_DOWNLOAD][FORMAT] = SettingsManager::LOG_FORMAT_POST_FINISHED_DOWNLOAD;
options[CHAT][FILE] = SettingsManager::LOG_FILE_MAIN_CHAT;
options[CHAT][FORMAT] = SettingsManager::LOG_FORMAT_MAIN_CHAT;
options[PM][FILE] = SettingsManager::LOG_FILE_PRIVATE_CHAT;
=== modified file 'dcpp/LogManager.h'
--- dcpp/LogManager.h 2011-03-08 22:48:55 +0000
+++ dcpp/LogManager.h 2011-03-10 20:27:58 +0000
@@ -34,7 +34,7 @@
typedef pair<time_t, string> Pair;
typedef deque<Pair> List;
- enum Area { CHAT, PM, DOWNLOAD, UPLOAD, SYSTEM, STATUS, LAST };
+ enum Area { CHAT, PM, DOWNLOAD, FINISHED_DOWNLOAD, UPLOAD, SYSTEM, STATUS, LAST };
enum { FILE, FORMAT };
void log(Area area, StringMap& params) throw();
=== modified file 'dcpp/QueueManager.cpp'
--- dcpp/QueueManager.cpp 2011-03-08 22:48:55 +0000
+++ dcpp/QueueManager.cpp 2011-03-10 20:27:58 +0000
@@ -40,6 +40,8 @@
#include "MerkleCheckOutputStream.h"
#include "SFVReader.h"
#include "FilteredFile.h"
+#include "FinishedItem.h"
+#include "FinishedManager.h"
#include <climits>
@@ -1139,6 +1141,7 @@
}
string dir;
+ bool crcError = false;
if(aDownload->getType() == Transfer::TYPE_FULL_LIST) {
dir = q->getTempTarget();
q->addSegment(Segment(0, q->getSize()));
@@ -1146,7 +1149,7 @@
q->addSegment(aDownload->getSegment());
if (q->isFinished() && BOOLSETTING(SFV_CHECK)) {
- checkSfv(q, aDownload);
+ crcError = checkSfv(q, aDownload);
}
}
@@ -1156,6 +1159,10 @@
moveFile(aDownload->getTempTarget(), aDownload->getPath());
}
+ if (BOOLSETTING(LOG_FINISHED_DOWNLOADS) && aDownload->getType() == Transfer::TYPE_FILE) {
+ logFinishedDownload(q, aDownload, crcError);
+ }
+
fire(QueueManagerListener::Finished(), q, dir, aDownload->getAverageSpeed());
userQueue.remove(q);
@@ -1712,7 +1719,7 @@
}
}
-void QueueManager::checkSfv(QueueItem* qi, Download* d) {
+bool QueueManager::checkSfv(QueueItem* qi, Download* d) {
SFVReader sfv(qi->getTarget());
if(sfv.hasCRC()) {
@@ -1741,12 +1748,13 @@
}
fire(QueueManagerListener::CRCFailed(), d, _("CRC32 inconsistency (SFV-Check)"));
- return;
+ return true;
}
dcdebug("QueueManager: CRC32 match for %s\n", qi->getTarget().c_str());
fire(QueueManagerListener::CRCChecked(), d);
}
+ return false;
}
uint32_t QueueManager::calcCrc32(const string& file) throw(FileException) {
@@ -1762,4 +1770,72 @@
return f.getFilter().getValue();
}
+void QueueManager::logFinishedDownload(QueueItem* qi, Download* d, bool crcError)
+{
+ StringMap params;
+ params["target"] = qi->getTarget();
+ params["fileSI"] = Util::toString(qi->getSize());
+ params["fileSIshort"] = Util::formatBytes(qi->getSize());
+ params["fileTR"] = qi->getTTH().toBase32();
+ params["sfv"] = Util::toString(crcError ? 1 : 0);
+
+ {
+ auto lock = FinishedManager::getInstance()->lockLists();
+
+ const FinishedManager::MapByFile& map = FinishedManager::getInstance()->getMapByFile(false);
+ FinishedManager::MapByFile::const_iterator it = map.find(qi->getTarget());
+ if(it != map.end()) {
+ auto entry = it->second;
+ if (!entry->getUsers().empty()) {
+ StringList nicks, cids, ips, hubNames, hubUrls, temp;
+ string ip;
+ for(auto i = entry->getUsers().begin(), iend = entry->getUsers().end(); i != iend; ++i) {
+
+ nicks.push_back(Util::toString(ClientManager::getInstance()->getNicks(*i)));
+ cids.push_back(i->user->getCID().toBase32());
+
+ ip.clear();
+ if (i->user->isOnline()) {
+ OnlineUser* u = ClientManager::getInstance()->findOnlineUser(*i, false);
+ if (u) {
+ ip = u->getIdentity().getIp();
+ }
+ }
+ if (ip.empty()) {
+ ip = _("Offline");
+ }
+ ips.push_back(ip);
+
+ temp = ClientManager::getInstance()->getHubNames(*i);
+ if(temp.empty()) {
+ temp.push_back(_("Offline"));
+ }
+ hubNames.push_back(Util::toString(temp));
+
+ temp = ClientManager::getInstance()->getHubs(*i);
+ if(temp.empty()) {
+ temp.push_back(_("Offline"));
+ }
+ hubUrls.push_back(Util::toString(temp));
+ }
+
+ params["userNI"] = Util::toString(nicks);
+ params["userCID"] = Util::toString(cids);
+ params["userI4"] = Util::toString(ips);
+ params["hubNI"] = Util::toString(hubNames);
+ params["hubURL"] = Util::toString(hubUrls);
+ }
+
+ params["fileSIsession"] = Util::toString(entry->getTransferred());
+ params["fileSIsessionshort"] = Util::formatBytes(entry->getTransferred());
+ params["fileSIactual"] = Util::toString(entry->getActual());
+ params["fileSIactualshort"] = Util::formatBytes(entry->getActual());
+
+ params["speed"] = str(F_("%1%/s") % Util::formatBytes(entry->getAverageSpeed()));
+ params["time"] = Util::formatSeconds(entry->getMilliSeconds() / 1000);
+ }
+ }
+
+ LOG(LogManager::FINISHED_DOWNLOAD, params);
+}
} // namespace dcpp
=== modified file 'dcpp/QueueManager.h'
--- dcpp/QueueManager.h 2011-02-19 22:27:39 +0000
+++ dcpp/QueueManager.h 2011-03-10 20:27:58 +0000
@@ -258,9 +258,11 @@
string getListPath(const HintedUser& user);
- void checkSfv(QueueItem* qi, Download* d);
+ bool checkSfv(QueueItem* qi, Download* d);
uint32_t calcCrc32(const string& file) throw(FileException);
+ void logFinishedDownload(QueueItem* qi, Download* d, bool crcError);
+
// TimerManagerListener
virtual void on(TimerManagerListener::Second, uint64_t aTick) throw();
virtual void on(TimerManagerListener::Minute, uint64_t aTick) throw();
=== modified file 'dcpp/SettingsManager.cpp'
--- dcpp/SettingsManager.cpp 2011-02-01 20:32:13 +0000
+++ dcpp/SettingsManager.cpp 2011-03-10 20:27:58 +0000
@@ -44,11 +44,11 @@
"FinishedDLFilesOrder", "FinishedDLFilesWidths", "FinishedDLUsersOrder", "FinishedDLUsersWidths",
"FinishedULFilesOrder", "FinishedULFilesWidths", "FinishedULUsersOrder", "FinishedULUsersWidths",
"UsersFrameOrder", "UsersFrameWidths", "HttpProxy", "LogDirectory", "LogFormatPostDownload",
- "LogFormatPostUpload", "LogFormatMainChat", "LogFormatPrivateChat",
+ "LogFormatPostFinishedDownload", "LogFormatPostUpload", "LogFormatMainChat", "LogFormatPrivateChat",
"TempDownloadDirectory", "BindAddress", "SocksServer", "SocksUser", "SocksPassword", "ConfigVersion",
"DefaultAwayMessage", "TimeStampsFormat", "ADLSearchFrameOrder", "ADLSearchFrameWidths",
- "CID", "SpyFrameWidths", "SpyFrameOrder", "LogFileMainChat",
- "LogFilePrivateChat", "LogFileStatus", "LogFileUpload", "LogFileDownload", "LogFileSystem",
+ "CID", "SpyFrameWidths", "SpyFrameOrder", "LogFileMainChat", "LogFilePrivateChat",
+ "LogFileStatus", "LogFileUpload", "LogFileDownload", "LogFileFinishedDownload", "LogFileSystem",
"LogFormatSystem", "LogFormatStatus", "DirectoryListingFrameOrder", "DirectoryListingFrameWidths",
"TLSPrivateKeyFile", "TLSCertificateFile", "TLSTrustedCertificatesPath",
"Language", "DownloadsOrder", "DownloadsWidth", "Toolbar", "LastSearchType",
@@ -59,7 +59,7 @@
"BackgroundColor", "TextColor", "UseOemMonoFont", "ShareHidden", "FilterMessages", "MinimizeToTray", "AlwaysTray",
"AutoSearch", "TimeStamps", "PopupHubPms", "PopupBotPms", "IgnoreHubPms", "IgnoreBotPms",
"ListDuplicates", "BufferSize", "DownloadSlots", "MaxDownloadSpeed", "LogMainChat", "LogPrivateChat",
- "LogDownloads", "LogUploads", "StatusInChat", "ShowJoins",
+ "LogDownloads", "LogFinishedDownloads", "LogUploads", "StatusInChat", "ShowJoins",
"UseSystemIcons", "PopupPMs", "MinUploadSpeed", "GetUserInfo", "UrlHandler", "MainWindowState",
"MainWindowSizeX", "MainWindowSizeY", "MainWindowPosX", "MainWindowPosY", "AutoAway",
"SocksPort", "SocksResolve", "KeepLists", "AutoKick", "QueueFrameShowTree",
@@ -164,6 +164,7 @@
setDefault(LOG_DIRECTORY, Util::getPath(Util::PATH_USER_LOCAL) + "Logs" PATH_SEPARATOR_STR);
setDefault(LOG_UPLOADS, false);
setDefault(LOG_DOWNLOADS, false);
+ setDefault(LOG_FINISHED_DOWNLOADS, false);
setDefault(LOG_PRIVATE_CHAT, false);
setDefault(LOG_MAIN_CHAT, false);
setDefault(STATUS_IN_CHAT, true);
@@ -173,8 +174,9 @@
setDefault(USE_OEM_MONOFONT, false);
setDefault(POPUP_PMS, true);
setDefault(MIN_UPLOAD_SPEED, 0);
- setDefault(LOG_FORMAT_POST_DOWNLOAD, "%Y-%m-%d %H:%M: %[target] " + string(_("downloaded from")) + " %[userNI] (%[userCID]), %[fileSI] (%[fileSIchunk]), %[speed], %[time], %[fileTR]");
- setDefault(LOG_FORMAT_POST_UPLOAD, "%Y-%m-%d %H:%M: %[source] " + string(_("uploaded to")) + " %[userNI] (%[userCID]), %[fileSI] (%[fileSIchunk]), %[speed], %[time], %[fileTR]");
+ setDefault(LOG_FORMAT_POST_DOWNLOAD, "%Y-%m-%d %H:%M: %[target] " + string(_("downloaded from")) + " %[userNI] (%[userCID]), %[fileSI] (%[fileSIactual]), %[speed], %[time], %[fileTR]");
+ setDefault(LOG_FORMAT_POST_FINISHED_DOWNLOAD, "%Y-%m-%d %H:%M: %[target] " + string(_("downloaded from")) + " %[userNI] (%[userCID]), %[fileSI] (%[fileSIsession]), %[speed], %[time], %[fileTR]");
+ setDefault(LOG_FORMAT_POST_UPLOAD, "%Y-%m-%d %H:%M: %[source] " + string(_("uploaded to")) + " %[userNI] (%[userCID]), %[fileSI] (%[fileSIactual]), %[speed], %[time], %[fileTR]");
setDefault(LOG_FORMAT_MAIN_CHAT, "[%Y-%m-%d %H:%M] %[message]");
setDefault(LOG_FORMAT_PRIVATE_CHAT, "[%Y-%m-%d %H:%M] %[message]");
setDefault(LOG_FORMAT_STATUS, "[%Y-%m-%d %H:%M] %[message]");
@@ -184,6 +186,7 @@
setDefault(LOG_FILE_PRIVATE_CHAT, "%[userNI].%[userCID].log");
setDefault(LOG_FILE_UPLOAD, "Uploads.log");
setDefault(LOG_FILE_DOWNLOAD, "Downloads.log");
+ setDefault(LOG_FILE_FINISHED_DOWNLOAD, "Finished_downloads.log");
setDefault(LOG_FILE_SYSTEM, "system.log");
setDefault(GET_USER_INFO, true);
setDefault(URL_HANDLER, false);
=== modified file 'dcpp/SettingsManager.h'
--- dcpp/SettingsManager.h 2011-01-02 17:12:02 +0000
+++ dcpp/SettingsManager.h 2011-03-10 20:27:58 +0000
@@ -62,12 +62,12 @@
FINISHED_DL_FILES_ORDER, FINISHED_DL_FILES_WIDTHS, FINISHED_DL_USERS_ORDER, FINISHED_DL_USERS_WIDTHS,
FINISHED_UL_FILES_ORDER, FINISHED_UL_FILES_WIDTHS, FINISHED_UL_USERS_ORDER, FINISHED_UL_USERS_WIDTHS,
USERSFRAME_ORDER, USERSFRAME_WIDTHS, HTTP_PROXY, LOG_DIRECTORY, LOG_FORMAT_POST_DOWNLOAD,
- LOG_FORMAT_POST_UPLOAD, LOG_FORMAT_MAIN_CHAT, LOG_FORMAT_PRIVATE_CHAT,
+ LOG_FORMAT_POST_FINISHED_DOWNLOAD, LOG_FORMAT_POST_UPLOAD, LOG_FORMAT_MAIN_CHAT, LOG_FORMAT_PRIVATE_CHAT,
TEMP_DOWNLOAD_DIRECTORY, BIND_ADDRESS, SOCKS_SERVER, SOCKS_USER, SOCKS_PASSWORD, CONFIG_VERSION,
DEFAULT_AWAY_MESSAGE, TIME_STAMPS_FORMAT, ADLSEARCHFRAME_ORDER, ADLSEARCHFRAME_WIDTHS,
PRIVATE_ID, SPYFRAME_WIDTHS, SPYFRAME_ORDER, LOG_FILE_MAIN_CHAT,
- LOG_FILE_PRIVATE_CHAT, LOG_FILE_STATUS, LOG_FILE_UPLOAD, LOG_FILE_DOWNLOAD, LOG_FILE_SYSTEM,
- LOG_FORMAT_SYSTEM, LOG_FORMAT_STATUS, DIRECTORYLISTINGFRAME_ORDER, DIRECTORYLISTINGFRAME_WIDTHS,
+ LOG_FILE_PRIVATE_CHAT, LOG_FILE_STATUS, LOG_FILE_UPLOAD, LOG_FILE_DOWNLOAD, LOG_FILE_FINISHED_DOWNLOAD,
+ LOG_FILE_SYSTEM, LOG_FORMAT_SYSTEM, LOG_FORMAT_STATUS, DIRECTORYLISTINGFRAME_ORDER, DIRECTORYLISTINGFRAME_WIDTHS,
TLS_PRIVATE_KEY_FILE, TLS_CERTIFICATE_FILE, TLS_TRUSTED_CERTIFICATES_PATH,
LANGUAGE, DOWNLOADS_ORDER, DOWNLOADS_WIDTHS, TOOLBAR, LAST_SEARCH_TYPE,
SOUND_MAIN_CHAT, SOUND_PM, SOUND_PM_WINDOW,
@@ -78,7 +78,7 @@
BACKGROUND_COLOR, TEXT_COLOR, USE_OEM_MONOFONT, SHARE_HIDDEN, FILTER_MESSAGES, MINIMIZE_TRAY, ALWAYS_TRAY,
AUTO_SEARCH, TIME_STAMPS, POPUP_HUB_PMS, POPUP_BOT_PMS, IGNORE_HUB_PMS, IGNORE_BOT_PMS,
LIST_DUPES, BUFFER_SIZE, DOWNLOAD_SLOTS, MAX_DOWNLOAD_SPEED, LOG_MAIN_CHAT, LOG_PRIVATE_CHAT,
- LOG_DOWNLOADS, LOG_UPLOADS, STATUS_IN_CHAT, SHOW_JOINS,
+ LOG_DOWNLOADS, LOG_FINISHED_DOWNLOADS, LOG_UPLOADS, STATUS_IN_CHAT, SHOW_JOINS,
USE_SYSTEM_ICONS, POPUP_PMS, MIN_UPLOAD_SPEED, GET_USER_INFO, URL_HANDLER, MAIN_WINDOW_STATE,
MAIN_WINDOW_SIZE_X, MAIN_WINDOW_SIZE_Y, MAIN_WINDOW_POS_X, MAIN_WINDOW_POS_Y, AUTO_AWAY,
SOCKS_PORT, SOCKS_RESOLVE, KEEP_LISTS, AUTO_KICK, QUEUEFRAME_SHOW_TREE,
=== modified file 'dcpp/Transfer.cpp'
--- dcpp/Transfer.cpp 2011-01-02 17:12:02 +0000
+++ dcpp/Transfer.cpp 2011-03-10 20:27:58 +0000
@@ -87,11 +87,9 @@
params["hubURL"] = Util::toString(hubs);
params["fileSI"] = Util::toString(getSize());
params["fileSIshort"] = Util::formatBytes(getSize());
-// params["fileSIchunk"] = Util::toString(getTotal());
-// params["fileSIchunkshort"] = Util::formatBytes(getTotal());
params["fileSIactual"] = Util::toString(getActual());
params["fileSIactualshort"] = Util::formatBytes(getActual());
- params["speed"] = Util::formatBytes(getAverageSpeed()) + "/s";
+ params["speed"] = str(F_("%1%/s") % Util::formatBytes(getAverageSpeed()));
params["time"] = Util::formatSeconds((GET_TICK() - getStart()) / 1000);
params["fileTR"] = getTTH().toBase32();
}
=== modified file 'help/settings_logs.html'
--- help/settings_logs.html 2010-12-03 13:59:16 +0000
+++ help/settings_logs.html 2011-03-10 20:27:58 +0000
@@ -27,39 +27,132 @@
<div>%[message] - Private chat message</div>
<div><b>Default format:</b> [%Y-%m-%d %H:%M] %[message]</div>
</dd>
- <dt>Log downloads</dt>
- <dd cshelp="IDH_SETTINGS_LOG_DOWNLOADS">Enables logging of completed downloads. File list downloads may not be logged if you've
-<a href="#filelist">disabled them</a>.
- </dd>
- <dt>Log uploads</dt>
- <dd cshelp="IDH_SETTINGS_LOG_UPLOADS">Enables logging of completed uploads.
-File list uploads may not be logged if you've
-<a href="#filelist">disabled them</a>.</dd>
+ <dt>Log downloaded segments</dt>
+ <dd cshelp="IDH_SETTINGS_LOG_DOWNLOADS">Enables logging of completed downloaded segments and file lists. File list downloads may not be logged if you've <a href="#filelist">disabled them</a>.
+ </dd>
+ <dt>Log finished downloads</dt>
+ <dd cshelp="IDH_SETTINGS_LOG_FINISHED_DOWNLOADS">Enables logging of completed downloads.
+ </dd>
+ <dt>Log uploaded segments</dt>
+ <dd cshelp="IDH_SETTINGS_LOG_UPLOADS">Enables logging of uploaded segments and file lists. File list uploads may not be logged if you've <a href="#filelist">disabled them</a>.</dd>
<dt>Download and upload log format</dt>
- <dd>
- <div>%[userNI] - User's nickname</div>
- <div>%[userCID] - User's CID</div>
- <div>%[userI4] - User's IP address</div>
- <div>%[hubNI] - Hub name</div>
- <div>%[hubURL] - Hub's IP address</div>
- <div>%[fileSI] - File Size</div>
- <div>%[fileSIshort] - File size, shortened and including units</div>
- <div>%[fileSIchunk] - Size uploaded this session</div>
- <div>%[fileSIchunkshort] - Size uploaded this session, short and including
-units</div>
- <div>%[fileSIactual] - Actual uploaded bytes, affected by compression</div>
- <div>%[fileSIactualshort] - Actual uploaded bytes, short and including units</div>
- <div>%[speed] - Speed of the transfer</div>
- <div>%[time] - Elapsed time of the transfer</div>
- <!-- Readd this when we'll have real finished files log
- <div>%[sfv] - Whether the file was checked against a SFV file (0 = no, 1 = yes).</div>
- -->
- <div>%[tth] - Base32 representation of the tiger tree root hash</div>
- <div>Only for Download log: %[target] - Local path and filename</div>
- <div>Only for Upload log: %[source] - Local path for the upload.</div>
+ <dd>The following format specifiers are available for the different type of transfer logs:
+ <table style="width: 70%; text-align: center;" border="1" cellpadding="2" cellspacing="2">
+ <tbody>
+ <tr>
+ <td style="font-weight: bold;">Parameter</td>
+ <td style="font-weight: bold;">Downloaded segments log</td>
+ <td style="font-weight: bold;">Finished downloads log</td>
+ <td style="font-weight: bold;">Uploaded segments log</td>
+ </tr>
+ <tr>
+ <td class="cl">%[target]</td>
+ <td>Local target path and filename</td>
+ <td>Local target path and filename</td>
+ <td>N/A</td>
+ </tr>
+ <tr>
+ <td class="cl">%[source]</td>
+ <td>N/A</td>
+ <td>N/A</td>
+ <td>Local path of the file the chunk uploaded from</td>
+ </tr>
+ <tr>
+ <td class="cl">%[userNI]</td>
+ <td>User's nickname</td>
+ <td>User nicknames</td>
+ <td>User's nickname</td>
+ </tr>
+ <tr>
+ <td class="cl">%[userCID]</td>
+ <td>User's CID</td>
+ <td>User CIDs</td>
+ <td>User's CID</td>
+ </tr>
+ <tr>
+ <td class="cl">%[userI4]</td>
+ <td>User's IPv4 address</td>
+ <td>User IPv4 addresses (available for ADC users only)</td>
+ <td>User's IPv4 address</td>
+ </tr>
+ <tr>
+ <td class="cl">%[hubNI]</td>
+ <td>Hub name</td>
+ <td>Hub names</td>
+ <td>Hub name</td>
+ </tr>
+ <tr>
+ <td class="cl">%[hubURL]</td>
+ <td>Hub's URL or IP address</td>
+ <td>Hub URLs or IP addresses</td>
+ <td>Hub's URL or IP address</td>
+ </tr>
+ <tr>
+ <td class="cl">%[fileSI]</td>
+ <td>Chunk size</td>
+ <td>Total file size</td>
+ <td>Chunk size</td>
+ </tr>
+ <tr>
+ <td class="cl">%[fileSIshort]</td>
+ <td>Chunk size, shortened and including units</td>
+ <td>Total file size, shortened and including units</td>
+ <td>Chunk size, shortened and including units</td>
+ </tr>
+ <tr>
+ <td class="cl">%[fileSIsession]</td>
+ <td>N/A</td>
+ <td>File size transferred in the current session</td>
+ <td>N/A</td>
+ </tr>
+ <tr>
+ <td class="cl">%[fileSIsessionshort]</td>
+ <td>N/A</td>
+ <td>File size transferred in the current session, shortened and including units</td>
+ <td>N/A</td>
+ </tr>
+ <tr>
+ <td class="cl">%[fileSIactual]</td>
+ <td>Actual transferred bytes, affected by compression</td>
+ <td>Actual transferred bytes (in the current session), affected by compression</td>
+ <td>Actual transferred bytes, affected by compression</td>
+ </tr>
+ <tr>
+ <td class="cl">%[fileSIactualshort]</td>
+ <td>Actual transferred bytes, short and including units</td>
+ <td>Actual transferred bytes (in the current session), short and including units</td>
+ <td>Actual transferred bytes, short and including units</td>
+ </tr>
+ <tr>
+ <td class="cl">%[speed]</td>
+ <td>Average speed of the transfer</td>
+ <td>Average speed of the transfer (in the current session)</td>
+ <td>Average speed of the transfer</td>
+ </tr>
+ <tr>
+ <td class="cl">%[time]</td>
+ <td>Actual chunk transfer time</td>
+ <td>Actual file transfer time in the current session</td>
+ <td>Actual chunk transfer time</td>
+ </tr>
+ <tr>
+ <td class="cl">%[fileTR]</td>
+ <td>TTH of the target file the chunk downloaded to</td>
+ <td>TTH of the target file</td>
+ <td>TTH of the target file the chunk uploaded from</td>
+ </tr>
+ <tr>
+ <td class="cl">%[sfv]</td>
+ <td>N/A</td>
+ <td>Whether the file was successfully checked against a SFV file (0 = no, 1 = yes)</td>
+ <td>N/A</td>
+ </tr>
+ </tbody>
+ </table>
</dd>
- <dd><div><b>Default download log format:</b> %Y-%m-%d %H:%M: %[target] downloaded from %[userNI] (%[userCID]), %[fileSI] (%[fileSIchunk]), %[speed], %[time]</div>
- <div><b>Default upload log format:</b> %Y-%m-%d %H:%M: %[source] uploaded to %[userNI] (%[userCID]), %[fileSI] (%[fileSIchunk]), %[speed], %[time]</div>
+ <dd><div><b>Default downloaded segments log format:</b> %Y-%m-%d %H:%M: %[target] downloaded from %[userNI] (%[userCID]), %[fileSI] (%[fileSIactual]), %[speed], %[time], %[fileTR]</div>
+ <div><b>Default finished downloads log format:</b> %Y-%m-%d %H:%M: %[target] downloaded from %[userNI] (%[userCID]), %[fileSI] (%[fileSIsession]), %[speed], %[time], %[fileTR]</div>
+ <div><b>Default uploaded segments log format:</b> %Y-%m-%d %H:%M: %[source] uploaded to %[userNI] (%[userCID]), %[fileSI] (%[fileSIactual]), %[speed], %[time], %[fileTR]</div>
</dd>
<dt id="system">Log system messages</dt>
<dd cshelp="IDH_SETTINGS_LOG_SYSTEM">Enables logging of system-level messages. Examples of
=== modified file 'help/style.css'
--- help/style.css 2008-11-20 18:33:43 +0000
+++ help/style.css 2011-03-10 20:27:58 +0000
@@ -9,3 +9,7 @@
border: 0;
vertical-align: middle;
}
+
+td.cl {
+ text-align: left;
+}
=== modified file 'win32/LogPage.cpp'
--- win32/LogPage.cpp 2011-01-02 17:12:02 +0000
+++ win32/LogPage.cpp 2011-03-10 20:27:58 +0000
@@ -30,8 +30,9 @@
PropPage::ListItem LogPage::listItems[] = {
{ SettingsManager::LOG_MAIN_CHAT, N_("Log main chat"), IDH_SETTINGS_LOG_MAIN_CHAT },
{ SettingsManager::LOG_PRIVATE_CHAT, N_("Log private chat"), IDH_SETTINGS_LOG_PRIVATE_CHAT },
- { SettingsManager::LOG_DOWNLOADS, N_("Log downloads"), IDH_SETTINGS_LOG_DOWNLOADS },
- { SettingsManager::LOG_UPLOADS, N_("Log uploads"), IDH_SETTINGS_LOG_UPLOADS },
+ { SettingsManager::LOG_DOWNLOADS, N_("Log downloaded segments"), IDH_SETTINGS_LOG_DOWNLOADS },
+ { SettingsManager::LOG_FINISHED_DOWNLOADS, N_("Log finished downloads"), IDH_SETTINGS_LOG_FINISHED_DOWNLOADS },
+ { SettingsManager::LOG_UPLOADS, N_("Log uploaded segments"), IDH_SETTINGS_LOG_UPLOADS },
{ SettingsManager::LOG_SYSTEM, N_("Log system messages"), IDH_SETTINGS_LOG_SYSTEM },
{ SettingsManager::LOG_STATUS_MESSAGES, N_("Log status messages"), IDH_SETTINGS_LOG_STATUS_MESSAGES },
{ SettingsManager::LOG_FILELIST_TRANSFERS, N_("Log filelist transfers"), IDH_SETTINGS_LOG_FILELIST_TRANSFERS },