aboutsummaryrefslogtreecommitdiffstats
path: root/mock-server/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mock-server/main.cpp')
-rw-r--r--mock-server/main.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/mock-server/main.cpp b/mock-server/main.cpp
index b104685..5613462 100644
--- a/mock-server/main.cpp
+++ b/mock-server/main.cpp
@@ -4,13 +4,24 @@
*/
#include "MockServer.h"
+#include <QCommandLineParser>
#include <QCoreApplication>
int
main (int argc, char *argv[])
{
+ qSetMessagePattern ("MockServer [%{time HH:mm:ss.zzz}] %{message}");
+
QCoreApplication app (argc, argv);
+ QCommandLineParser parser;
+ parser.addOption ({ "wire-debug", "Log raw wire TX/RX to dev log" });
+ parser.addHelpOption ();
+ parser.process (app);
+
+ if (parser.isSet ("wire-debug"))
+ MockServer::enableWireDebug ();
+
new MockServer (&app);
return app.exec ();