mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 23:05:36 +08:00
Expand file log header with build info, version and system diagnostics
refs #902
This commit is contained in:
committed by
Mathew Sutcliffe
parent
15b50791ef
commit
272fa95576
@@ -7,6 +7,7 @@
|
||||
* contained in the LICENSE file.
|
||||
*/
|
||||
|
||||
#include "blackconfig/buildconfig.h"
|
||||
#include "blackmisc/filelogger.h"
|
||||
#include "blackmisc/loghandler.h"
|
||||
|
||||
@@ -115,8 +116,19 @@ namespace BlackMisc
|
||||
|
||||
void CFileLogger::writeHeaderToFile()
|
||||
{
|
||||
QString header(QStringLiteral("Application started."));
|
||||
writeContentToFile(header);
|
||||
m_stream << "This is " << m_applicationName;
|
||||
m_stream << " version " << BlackConfig::CVersion::version();
|
||||
m_stream << " running on " << QSysInfo::prettyProductName();
|
||||
m_stream << " " << QSysInfo::currentCpuArchitecture() << endl;
|
||||
|
||||
m_stream << "Built from revision " << BlackConfig::CBuildConfig::gitHeadSha1();
|
||||
m_stream << " on " << BlackConfig::CBuildConfig::buildDateAndTime() << endl;
|
||||
|
||||
m_stream << "Built with Qt " << QT_VERSION_STR;
|
||||
m_stream << " and running with Qt " << qVersion();
|
||||
m_stream << " " << QSysInfo::buildAbi() << endl;
|
||||
|
||||
m_stream << "Application started." << endl;
|
||||
}
|
||||
|
||||
void CFileLogger::writeContentToFile(const QString &content)
|
||||
|
||||
Reference in New Issue
Block a user