diff --git a/Framework/Kernel/inc/MantidKernel/UsageService.h b/Framework/Kernel/inc/MantidKernel/UsageService.h index 82e16d20d6eff843bc88a6550b95ebe96adf0042..b1fb664ccbc2561353f579c24e7a3263da7853b3 100644 --- a/Framework/Kernel/inc/MantidKernel/UsageService.h +++ b/Framework/Kernel/inc/MantidKernel/UsageService.h @@ -140,7 +140,7 @@ private: Poco::ActiveMethod<int, std::string, UsageServiceImpl> m_startupActiveMethod; /// Async method for sending feature notifications Poco::ActiveMethod<int, std::string, UsageServiceImpl> m_featureActiveMethod; - + /// Stores the base url of the usage system std::string m_url; }; diff --git a/Framework/Kernel/src/ErrorReporter.cpp b/Framework/Kernel/src/ErrorReporter.cpp index 6ba282393a293b423ef4ac2085717728f538d82c..229192ba48feae513a03e1a2ab4d4f5b41fae29f 100644 --- a/Framework/Kernel/src/ErrorReporter.cpp +++ b/Framework/Kernel/src/ErrorReporter.cpp @@ -32,12 +32,12 @@ ErrorReporter::ErrorReporter(std::string application, m_errorActiveMethod(this, &ErrorReporter::sendErrorAsyncImpl), m_exitCode(exitCode), m_upTime(upTime), m_share(share), m_name(""), m_email("") { - int retval = Mantid::Kernel::ConfigService::Instance().getValue( + int retval = Mantid::Kernel::ConfigService::Instance().getValue( "error_root_url", m_url); - if(retval == 0) { - g_log.error() << "Failed to load error report url\n"; - } - } + if (retval == 0) { + g_log.error() << "Failed to load error report url\n"; + } +} /** Constructor */ @@ -49,12 +49,12 @@ ErrorReporter::ErrorReporter(std::string application, m_errorActiveMethod(this, &ErrorReporter::sendErrorAsyncImpl), m_exitCode(exitCode), m_upTime(upTime), m_share(share), m_name(name), m_email(email) { - int retval = Mantid::Kernel::ConfigService::Instance().getValue( + int retval = Mantid::Kernel::ConfigService::Instance().getValue( "error_root_url", m_url); - if(retval == 0) { - g_log.error() << "Failed to load error report url\n"; - } - } + if (retval == 0) { + g_log.error() << "Failed to load error report url\n"; + } +} /** Generates an error message and then calls an internet helper to send it */ diff --git a/Framework/Kernel/src/UsageService.cpp b/Framework/Kernel/src/UsageService.cpp index aab5674767a483bca7dff8214f4d296a71f0b44d..8fe49038dceacdccfd5cbdc63f0f678a6112c0b2 100644 --- a/Framework/Kernel/src/UsageService.cpp +++ b/Framework/Kernel/src/UsageService.cpp @@ -76,12 +76,11 @@ UsageServiceImpl::UsageServiceImpl() setInterval(60); int retval = Mantid::Kernel::ConfigService::Instance().getValue( "usage_root_url", m_url); - if(retval == 0) { + if (retval == 0) { g_log.error() << "Failed to load usage report url\n"; } else { g_log.information() << "Root usage reporting url is " << m_url << "\n"; } - } void UsageServiceImpl::setApplication(const std::string &name) { @@ -140,7 +139,7 @@ void UsageServiceImpl::flush() { } } -/** getUpTime returns the time for which the mantid instance has been running +/** getUpTime returns the time for which the mantid instance has been running @return time_duration The time for which mantid has been running. */ Types::Core::time_duration UsageServiceImpl::getUpTime() { @@ -295,13 +294,13 @@ std::string UsageServiceImpl::generateFeatureUsageMessage() { /**Async method for sending startup messages */ int UsageServiceImpl::sendStartupAsyncImpl(const std::string &message) { - return this->sendReport(message, m_url+"/api/usage"); + return this->sendReport(message, m_url + "/api/usage"); } /**Async method for sending feature messages */ int UsageServiceImpl::sendFeatureAsyncImpl(const std::string &message) { - return this->sendReport(message, m_url+"/api/feature"); + return this->sendReport(message, m_url + "/api/feature"); } int UsageServiceImpl::sendReport(const std::string &message,