summaryrefslogtreecommitdiff
path: root/macosx/main.mm
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2014-07-11 14:34:17 -0700
committerKonstantin Käfer <mail@kkaefer.com>2014-07-11 14:34:17 -0700
commit7ffe4a7858bc5d071b87612bdaa19d8eaf29045c (patch)
tree701750687b9331dcd290d9831ad8b62be9a97cae /macosx/main.mm
parentf3c55eba9da59042a96e683f841060674519520b (diff)
downloadqtlocation-mapboxgl-7ffe4a7858bc5d071b87612bdaa19d8eaf29045c.tar.gz
add nslog and stderr log backends
Diffstat (limited to 'macosx/main.mm')
-rw-r--r--macosx/main.mm7
1 files changed, 4 insertions, 3 deletions
diff --git a/macosx/main.mm b/macosx/main.mm
index 3b01df04e6..f72476cde2 100644
--- a/macosx/main.mm
+++ b/macosx/main.mm
@@ -1,9 +1,12 @@
#include "../common/settings_nsuserdefaults.hpp"
#include "../common/glfw_view.hpp"
+#include "../common/nslog_log.hpp"
#import <Foundation/Foundation.h>
int main() {
+ llmr::Log::Set<llmr::NSLogBackend>();
+
GLFWView view;
llmr::Map map(view);
@@ -16,7 +19,7 @@ int main() {
// Set access token if present
const char *token = getenv("MAPBOX_ACCESS_TOKEN");
if (token == nullptr) {
- fprintf(stderr, "[WARNING] no access token set. mapbox.com tiles won't work.\n");
+ llmr::Log::Warning(llmr::Event::Setup, "no access token set. mapbox.com tiles won't work.");
} else {
map.setAccessToken(std::string(token));
}
@@ -28,8 +31,6 @@ int main() {
error:nil];
map.setStyleJSON((std::string)[json cStringUsingEncoding:[NSString defaultCStringEncoding]]);
- // fprintf(stderr, "lon: %f, lat: %f, zoom: %f, angle: %f, debug: %d\n", settings.l)
-
int ret = view.run();
// Save settings