summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI')
-rw-r--r--Swift/QtUI/QtSwift.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/Swift/QtUI/QtSwift.cpp b/Swift/QtUI/QtSwift.cpp
index 67fc659..7daa5ce 100644
--- a/Swift/QtUI/QtSwift.cpp
+++ b/Swift/QtUI/QtSwift.cpp
@@ -103,2 +103,3 @@ po::options_description QtSwift::getOptionsDescription() {
#endif
+ ("logfile", po::value<std::string>()->implicit_value(""), "Save all logging information to a file")
;
@@ -191,2 +192,12 @@ QtSwift::QtSwift(const po::variables_map& options) : networkFactories_(&clientMa
+ if (options.count("logfile")) {
+ try {
+ std::string fileName = options["logfile"].as<std::string>();
+ Log::setLogFile(fileName);
+ }
+ catch (...) {
+ SWIFT_LOG(error) << "Error while retrieving the specified log file name from the command line" << std::endl;
+ }
+ }
+
// Load fonts