aboutsummaryrefslogtreecommitdiff
path: root/apps/launcher.cpp
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2015-06-21 12:27:48 +0200
committerTrygve Laugstøl <trygvis@inamo.no>2015-06-21 12:27:48 +0200
commitf4afc04ee7a085a89ad84ba89344bb50ca9e6e04 (patch)
tree404058c5ffd4773dfe13ddcd7a1cafc39864ae21 /apps/launcher.cpp
parent7e2fb834d8ba2eb3fd6453f135d3e8ef30c852c6 (diff)
downloadble-toys-f4afc04ee7a085a89ad84ba89344bb50ca9e6e04.tar.gz
ble-toys-f4afc04ee7a085a89ad84ba89344bb50ca9e6e04.tar.bz2
ble-toys-f4afc04ee7a085a89ad84ba89344bb50ca9e6e04.tar.xz
ble-toys-f4afc04ee7a085a89ad84ba89344bb50ca9e6e04.zip
o Trying to make the Bluetooth API more C++ idiomatic, a GATT connection has the same lifecycle as a BluetoothGatt.
sm-get-value: o Better error handling.
Diffstat (limited to 'apps/launcher.cpp')
-rw-r--r--apps/launcher.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/apps/launcher.cpp b/apps/launcher.cpp
index 4c1f687..2a1e039 100644
--- a/apps/launcher.cpp
+++ b/apps/launcher.cpp
@@ -2,9 +2,10 @@
#include "apps-list.gen.h"
#include <log4cplus/consoleappender.h>
#include <log4cplus/configurator.h>
-#include <boost/algorithm/string/predicate.hpp>
-using namespace trygvis::apps;
+namespace trygvis {
+namespace apps {
+
using namespace std;
const po::options_description logging_options() {
@@ -16,7 +17,7 @@ const po::options_description logging_options() {
void setup_logging(string app_name) {
Appender *console = new ConsoleAppender(true, true);
- string pattern = string("%-5p ") /*"%6r "*/ + app_name + "/%-20c %m%n";
+ string pattern = string("%-5p ") /*"%6r "*/ + app_name + "/%-20c %m%n"; // add %M (function name)
PatternLayout *layout = new PatternLayout(LOG4CPLUS_TEXT(pattern));
console->setLayout(auto_ptr<Layout>(layout));
@@ -74,6 +75,11 @@ int launch_app(int argc, const char *argv[]) {
return EXIT_FAILURE;
}
}
+}
+}
+
+using namespace std;
+using namespace trygvis::apps;
int main(int argc, const char *argv[]) {
if (argc == 0) {