Add --debug switch
This commit is contained in:
parent
a70044e67b
commit
dd1dca3751
2 changed files with 8 additions and 1 deletions
|
|
@ -128,6 +128,8 @@ main(int argc, char *argv[])
|
|||
QCommandLineParser parser;
|
||||
parser.addHelpOption();
|
||||
parser.addVersionOption();
|
||||
QCommandLineOption debugOption("debug", "Enable debug output");
|
||||
parser.addOption(debugOption);
|
||||
parser.process(app);
|
||||
|
||||
app.setWindowIcon(QIcon(":/logos/nheko.png"));
|
||||
|
|
@ -138,6 +140,9 @@ main(int argc, char *argv[])
|
|||
|
||||
registerSignalHandlers();
|
||||
|
||||
if (parser.isSet(debugOption))
|
||||
nhlog::enable_debug_log_from_commandline = true;
|
||||
|
||||
try {
|
||||
nhlog::init(QString("%1/nheko.log")
|
||||
.arg(QStandardPaths::writableLocation(QStandardPaths::CacheLocation))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue