mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-05-03 15:59:30 +08:00
Add current log file as file attachment to crash dump
ref T401
This commit is contained in:
committed by
Mat Sutcliffe
parent
4ca1f46f74
commit
50e82c26c6
@@ -1667,6 +1667,13 @@ namespace BlackCore
|
|||||||
annotations["format"] = "minidump";
|
annotations["format"] = "minidump";
|
||||||
annotations["version"] = CBuildConfig::getVersionString().toStdString();
|
annotations["version"] = CBuildConfig::getVersionString().toStdString();
|
||||||
|
|
||||||
|
QString logFilePath = m_fileLogger->getLogFilePath();
|
||||||
|
QString logFileName = m_fileLogger->getLogFileName();
|
||||||
|
QString logAttachment = QString("--attachment=%1=%2").arg(logFileName, logFilePath);
|
||||||
|
|
||||||
|
std::vector<std::string> arguments;
|
||||||
|
arguments.push_back(logAttachment.toStdString());
|
||||||
|
|
||||||
QDir().mkpath(database);
|
QDir().mkpath(database);
|
||||||
m_crashReportDatabase = CrashReportDatabase::Initialize(qstringToFilePath(database));
|
m_crashReportDatabase = CrashReportDatabase::Initialize(qstringToFilePath(database));
|
||||||
crashpad::Settings *settings = m_crashReportDatabase->GetSettings();
|
crashpad::Settings *settings = m_crashReportDatabase->GetSettings();
|
||||||
@@ -1677,7 +1684,7 @@ namespace BlackCore
|
|||||||
qstringToFilePath(metrics),
|
qstringToFilePath(metrics),
|
||||||
serverUrl.getFullUrl().toStdString(),
|
serverUrl.getFullUrl().toStdString(),
|
||||||
annotations,
|
annotations,
|
||||||
{},
|
arguments,
|
||||||
false, true);
|
false, true);
|
||||||
return CStatusMessage(this).info(u"Using crash handler");
|
return CStatusMessage(this).info(u"Using crash handler");
|
||||||
#else
|
#else
|
||||||
|
|||||||
Reference in New Issue
Block a user