mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-09 05:28:09 +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["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);
|
||||
m_crashReportDatabase = CrashReportDatabase::Initialize(qstringToFilePath(database));
|
||||
crashpad::Settings *settings = m_crashReportDatabase->GetSettings();
|
||||
@@ -1677,7 +1684,7 @@ namespace BlackCore
|
||||
qstringToFilePath(metrics),
|
||||
serverUrl.getFullUrl().toStdString(),
|
||||
annotations,
|
||||
{},
|
||||
arguments,
|
||||
false, true);
|
||||
return CStatusMessage(this).info(u"Using crash handler");
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user