diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2020-04-15 23:28:04 +0200 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2020-04-15 23:28:04 +0200 |
commit | dd1dca375198732ea3ad02e7f1cb24b16c393e04 (patch) | |
tree | 8a79a475681dbc4c3501866a6d00ec0d2c253352 /src/main.cpp | |
parent | Cache decrypted events (diff) | |
download | nheko-dd1dca375198732ea3ad02e7f1cb24b16c393e04.tar.xz |
Add --debug switch
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp index 042ef8c0..09c326f4 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -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)) |