diff options
author | Fabian Guerra Soto <fabian.guerra@mapbox.com> | 2018-11-14 15:42:18 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-14 15:42:18 -0800 |
commit | c8fbcfd322e1af4520f0bdc7e5945f6ffd3b4b73 (patch) | |
tree | 9158facaa7fc8b728a69f87f494a71fb659d9727 /platform/darwin/src/MGLStyleLayer.mm.ejs | |
parent | 86677b97c6d5e7db75358e9f5745dab4cec5d0e4 (diff) | |
download | qtlocation-mapboxgl-c8fbcfd322e1af4520f0bdc7e5945f6ffd3b4b73.tar.gz |
[ios, macos] Logging. (#13235)
* [ios, macos] Update the logging subsystem to platform agnostic.
* [ios, macos] Add coordinate to string function.
* [ios, macos] Add BOOL to string function.
* [ios, macos] Add tracing logs.
* [ios, macos] Add tracing logs to generated style classes.
* [ios, macos] Split logging categories accordingly to MGLLoggingLevel.
* [ios, macos] Log network requests.
* [ios, macos] Migrate NSAssert to MGLAssert.
* [ios, macos] Include MGLLoggingConfiguration to filesource-files.txt.
* [ios, macos] Fix logger string specifier for the line parameter.
* [ios, macos] Add logs to shapes classes.
* [ios, macos] Add logs to offline classes.
* [ios, macos] Add logs to annotation classes.
* [ios, macos] Add logs to foundation classes.
* [ios, macos] Fix snapshotter size logging.
* [macos] Add logs to map view.
* [ios, macos] Fix string from boolean prefix, add custom function for NSCAssert.
* Log size test
* [ios, macos] Add logging conditional compilation flag.
* [ios, macos] Rename function NSStringFromMGLTransition to MGLStringFromMGLTransition.
* [ios, macos] Remove verbose logging for release builds.
* [ios, macos] Rename NSStringFromCLLocationCoordinate2D to MGLStringFromCLLocationCoordinate2D.
* [ios, macos] Clean unnecesary blank lines in MGLLight.mm set methods.
* [ios, macos] Fix logging grammar, format, function names.
* [ios, macos] Remove compilation flag, rename flags.
Diffstat (limited to 'platform/darwin/src/MGLStyleLayer.mm.ejs')
-rw-r--r-- | platform/darwin/src/MGLStyleLayer.mm.ejs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/platform/darwin/src/MGLStyleLayer.mm.ejs b/platform/darwin/src/MGLStyleLayer.mm.ejs index 6d0c4bfdd9..b7be5fb9be 100644 --- a/platform/darwin/src/MGLStyleLayer.mm.ejs +++ b/platform/darwin/src/MGLStyleLayer.mm.ejs @@ -13,6 +13,7 @@ #import "MGLStyleLayer_Private.h" #import "MGLStyleValue_Private.h" #import "MGL<%- camelize(type) %>StyleLayer.h" +#import "MGLLoggingConfiguration_Private.h" #include <mbgl/style/transition_options.hpp> #include <mbgl/style/layers/<%- type.replace('-', '_') %>_layer.hpp> @@ -58,6 +59,7 @@ namespace mbgl { <% if (type == 'background') { -%> - (instancetype)initWithIdentifier:(NSString *)identifier { + MGLLogDebug(@"Initializing %@ with identifier: %@", NSStringFromClass([self class]), identifier); auto layer = std::make_unique<mbgl::style::<%- camelize(type) %>Layer>(identifier.UTF8String); return self = [super initWithPendingLayer:std::move(layer)]; } @@ -65,6 +67,7 @@ namespace mbgl { <% } else { -%> - (instancetype)initWithIdentifier:(NSString *)identifier source:(MGLSource *)source { + MGLLogDebug(@"Initializing %@ with identifier: %@ source: %@", NSStringFromClass([self class]), identifier, source); auto layer = std::make_unique<mbgl::style::<%- camelize(type) %>Layer>(identifier.UTF8String, source.identifier.UTF8String); return self = [super initWithPendingLayer:std::move(layer)]; } @@ -95,6 +98,7 @@ namespace mbgl { - (void)setSourceLayerIdentifier:(NSString *)sourceLayerIdentifier { MGLAssertStyleLayerIsValid(); + MGLLogDebug(@"Setting sourceLayerIdentifier: %@", sourceLayerIdentifier); self.rawLayer->setSourceLayer(sourceLayerIdentifier.UTF8String ?: ""); } @@ -102,6 +106,7 @@ namespace mbgl { - (void)setPredicate:(NSPredicate *)predicate { MGLAssertStyleLayerIsValid(); + MGLLogDebug(@"Setting predicate: %@", predicate); self.rawLayer->setFilter(predicate ? predicate.mgl_filter : mbgl::style::Filter()); } @@ -120,6 +125,7 @@ namespace mbgl { <% for (const property of layoutProperties) { -%> - (void)set<%- camelize(property.name) %>:(NSExpression *)<%- objCName(property) %> { MGLAssertStyleLayerIsValid(); + MGLLogDebug(@"Setting <%- objCName(property) %>: %@", <%- objCName(property) %>); <% if (property.tokens) { -%> if (<%- objCName(property) %> && <%- objCName(property) %>.expressionType == NSConstantValueExpressionType) { @@ -171,6 +177,7 @@ namespace mbgl { - (void)set<%- camelize(property.name) %>:(NSExpression *)<%- objCName(property) %> { MGLAssertStyleLayerIsValid(); + MGLLogDebug(@"Setting <%- objCName(property) %>: %@", <%- objCName(property) %>); <% switch (property['property-type']) { case 'color-ramp': -%> @@ -199,6 +206,7 @@ namespace mbgl { - (void)set<%- camelize(property.name) %>Transition:(MGLTransition )transition { MGLAssertStyleLayerIsValid(); + MGLLogDebug(@"Setting <%- objCName(property) %>Transition: %@", MGLStringFromMGLTransition(transition)); mbgl::style::TransitionOptions options { { MGLDurationFromTimeInterval(transition.duration) }, { MGLDurationFromTimeInterval(transition.delay) } }; self.rawLayer->set<%- camelize(originalPropertyName(property)) %>Transition(options); |