From def27bce4d203eb6e62175ecfb4e728cf64cd483 Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Tue, 31 May 2016 00:07:08 +0800 Subject: [PATCH] Add log messages --- src/app/application.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app/application.cpp b/src/app/application.cpp index 3b1ff7b1a..7dba95be8 100644 --- a/src/app/application.cpp +++ b/src/app/application.cpp @@ -264,6 +264,7 @@ void Application::sendNotificationEmail(BitTorrent::TorrentHandle *const torrent void Application::torrentFinished(BitTorrent::TorrentHandle *const torrent) { Preferences *const pref = Preferences::instance(); + Logger *logger = Logger::instance(); // AutoRun program if (pref->isAutoRunEnabled()) { @@ -279,12 +280,15 @@ void Application::torrentFinished(BitTorrent::TorrentHandle *const torrent) program.replace("%T", torrent->currentTracker()); program.replace("%I", torrent->hash()); + logger->addMessage(tr("Torrent: %1, running external program: %2").arg(torrent->name()).arg(program)); QProcess::startDetached(program); } // Mail notification - if (pref->isMailNotificationEnabled()) + if (pref->isMailNotificationEnabled()) { + logger->addMessage(tr("Torrent: %1, sending mail notification").arg(torrent->name())); sendNotificationEmail(torrent); + } } void Application::allTorrentsFinished()