QtCraft API C++ classes QML types Handbook

QcDiagnosticsSession Class

Logging and crash reports of one run of a program (decision E-834), from the start of main() until its end: deletes the files of old sessions, installs the log file (QcMessageLog) with its header and the crash handler, applies –log-rules, and on destruction closes the log. More...

Header: #include <common/diagnostics/QcDiagnosticsSession.h>

Public Types

struct Start

Public Functions

QcDiagnosticsSession(const QcDiagnosticsSession &)
QcDiagnosticsSession(QcDiagnosticsSession &&)
QString crashReportPath() const
int healthSeconds() const
QString logDirectory() const
QString logPath() const
QString previousCrashReport() const
void runCrashTest() const
QcDiagnosticsSession &operator=(QcDiagnosticsSession &&)
QcDiagnosticsSession &operator=(const QcDiagnosticsSession &)

Static Public Members

QStringList withoutSecrets(const QStringList &arguments)

Detailed Description

Files go to <data>/logs unless –log-file names another file.

Member Function Documentation

[delete] QcDiagnosticsSession::QcDiagnosticsSession(const QcDiagnosticsSession &)

Copy-constructs an instance of QcDiagnosticsSession. This function is deleted.

[delete] QcDiagnosticsSession::QcDiagnosticsSession(QcDiagnosticsSession &&)

Move-constructs an instance of QcDiagnosticsSession. This function is deleted.

QString QcDiagnosticsSession::crashReportPath() const

Returns this run's crash report (written only on a crash).

int QcDiagnosticsSession::healthSeconds() const

Returns the seconds between health lines: –health-log, else the default while a log file is written.

QString QcDiagnosticsSession::logDirectory() const

Returns <data>/logs.

QString QcDiagnosticsSession::logPath() const

Returns the log written now; empty when none.

QString QcDiagnosticsSession::previousCrashReport() const

Returns the crash report the previous session of this program left (renamed by QcLogFiles::markSeen); empty when it ended normally or an earlier start named it already.

void QcDiagnosticsSession::runCrashTest() const

Runs –crash-test when it was given (does not return then).

[static] QStringList QcDiagnosticsSession::withoutSecrets(const QStringList &arguments)

Returns the command line arguments with the value of every password option replaced (header, bundle).

[delete] QcDiagnosticsSession &QcDiagnosticsSession::operator=(QcDiagnosticsSession &&)

Move-assigns other to this QcDiagnosticsSession instance. This function is deleted.

[delete] QcDiagnosticsSession &QcDiagnosticsSession::operator=(const QcDiagnosticsSession &)

Copy-assigns other to this QcDiagnosticsSession instance. This function is deleted.