Added output option for debug statements to the command line

This commit is contained in:
Jordan Sherer 2019-11-14 20:37:03 -05:00
parent 8aa0430834
commit ea76d0e8d2

View File

@ -116,6 +116,9 @@ int main(int argc, char *argv[])
auto help_option = parser.addHelpOption ();
auto version_option = parser.addVersionOption ();
QCommandLineOption output_option(QStringList() << "o" << "output", "Write debug statements into <file>.", "file");
parser.addOption (output_option);
// support for multiple instances running from a single installation
QCommandLineOption rig_option (QStringList {} << "r" << "rig-name"
, a.translate ("main", "Where <rig-name> is for multi-instance support.")
@ -151,6 +154,10 @@ int main(int argc, char *argv[])
}
}
if(parser.isSet(output_option)){
new TraceFile(parser.value(output_option));
}
QStandardPaths::setTestModeEnabled (parser.isSet (test_option));
// support for multiple instances running from a single installation