summaryrefslogtreecommitdiff
path: root/src/mbgl/map
diff options
context:
space:
mode:
authorJohn Firebaugh <john.firebaugh@gmail.com>2015-03-12 15:39:07 -0700
committerJohn Firebaugh <john.firebaugh@gmail.com>2015-03-12 15:39:07 -0700
commitba933b3f452156bf0a4ce63a0de89c9bcb861387 (patch)
treebe7aea599e6f1d7a84f28965508ba6c8527547a9 /src/mbgl/map
parent4c7939b96eddb53f1700edfaea7abe1fa5b0e886 (diff)
parent124b49562ddfe951ad82243b56a859a46a58bd57 (diff)
downloadqtlocation-mapboxgl-ba933b3f452156bf0a4ce63a0de89c9bcb861387.tar.gz
Merge pull request #984 from mapbox/log_stderr_printf
Get rid of printf and cout by using Log::*
Diffstat (limited to 'src/mbgl/map')
-rw-r--r--src/mbgl/map/tile_parser.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mbgl/map/tile_parser.cpp b/src/mbgl/map/tile_parser.cpp
index 48f5b1405f..c50c394e2c 100644
--- a/src/mbgl/map/tile_parser.cpp
+++ b/src/mbgl/map/tile_parser.cpp
@@ -1,5 +1,6 @@
#include <mbgl/map/tile_parser.hpp>
#include <mbgl/map/vector_tile_data.hpp>
+#include <mbgl/platform/log.hpp>
#include <mbgl/style/style.hpp>
#include <mbgl/style/style_layer.hpp>
#include <mbgl/style/style_layer_group.hpp>
@@ -85,7 +86,7 @@ void TileParser::parseStyleLayers(util::ptr<const StyleLayerGroup> group) {
}
}
} else {
- fprintf(stderr, "[WARNING] layer '%s' does not have buckets\n", layer_desc->id.c_str());
+ Log::Warning(Event::ParseTile, "layer '%s' does not have buckets", layer_desc->id.c_str());
}
}
}
@@ -198,12 +199,13 @@ std::unique_ptr<Bucket> TileParser::createBucket(const StyleBucket &bucketDesc)
} else if (bucketDesc.type == StyleLayerType::Raster) {
return nullptr;
} else {
- fprintf(stderr, "[WARNING] unknown bucket render type for layer '%s' (source layer '%s')\n", bucketDesc.name.c_str(), bucketDesc.source_layer.c_str());
+ Log::Warning(Event::ParseTile, "unknown bucket render type for layer '%s' (source layer '%s')",
+ bucketDesc.name.c_str(), bucketDesc.source_layer.c_str());
}
} else {
// The layer specified in the bucket does not exist. Do nothing.
if (debug::tileParseWarnings) {
- fprintf(stderr, "[WARNING] layer '%s' does not exist in tile %d/%d/%d\n",
+ Log::Warning(Event::ParseTile, "layer '%s' does not exist in tile %d/%d/%d",
bucketDesc.source_layer.c_str(), tile.id.z, tile.id.x, tile.id.y);
}
}