mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 13:09:52 +02:00
Update BugSplat to only send first and last log files
This commit is contained in:
parent
2d60a9a51e
commit
6232c82f66
1 changed files with 5 additions and 1 deletions
|
@ -181,7 +181,11 @@ int main(int argc, const char* argv[]) {
|
||||||
auto logPath = QDir::toNativeSeparators(logger->getFilename());
|
auto logPath = QDir::toNativeSeparators(logger->getFilename());
|
||||||
mpSender.sendAdditionalFile(qPrintable(logPath));
|
mpSender.sendAdditionalFile(qPrintable(logPath));
|
||||||
|
|
||||||
QObject::connect(logger, &FileLogger::rollingLogFile, &app, [&mpSender](QString newFilename) {
|
QMetaObject::Connection connection;
|
||||||
|
connection = QObject::connect(logger, &FileLogger::rollingLogFile, &app, [&mpSender, &connection](QString newFilename) {
|
||||||
|
// We only want to add the first rolled log file (the "beginning" of the log) to BugSplat to ensure we don't exceed the 2MB
|
||||||
|
// zipped limit, so we disconnect here.
|
||||||
|
QObject::disconnect(connection);
|
||||||
auto rolledLogPath = QDir::toNativeSeparators(newFilename);
|
auto rolledLogPath = QDir::toNativeSeparators(newFilename);
|
||||||
mpSender.sendAdditionalFile(qPrintable(rolledLogPath));
|
mpSender.sendAdditionalFile(qPrintable(rolledLogPath));
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue