summaryrefslogtreecommitdiff
path: root/linux
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 /linux
parentf3c55eba9da59042a96e683f841060674519520b (diff)
downloadqtlocation-mapboxgl-7ffe4a7858bc5d071b87612bdaa19d8eaf29045c.tar.gz
add nslog and stderr log backends
Diffstat (limited to 'linux')
-rw-r--r--linux/main.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/linux/main.cpp b/linux/main.cpp
index 889a246c29..11a21880f1 100644
--- a/linux/main.cpp
+++ b/linux/main.cpp
@@ -8,6 +8,7 @@
#include "../common/settings_json.hpp"
#include "../common/glfw_view.hpp"
+#include "../common/stderr_log.hpp"
GLFWView *view = nullptr;
@@ -22,6 +23,8 @@ void quit_handler(int) {
}
int main(int argc, char *argv[]) {
+ llmr::Log::Set<llmr::StderrLogBackend>();
+
int fullscreen_flag = 0;
const struct option long_options[] = {
@@ -63,7 +66,7 @@ int main(int argc, char *argv[]) {
// 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));
}