From c8fbcfd322e1af4520f0bdc7e5945f6ffd3b4b73 Mon Sep 17 00:00:00 2001 From: Fabian Guerra Soto Date: Wed, 14 Nov 2018 15:42:18 -0800 Subject: [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. --- platform/darwin/src/MGLCompassDirectionFormatter.m | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'platform/darwin/src/MGLCompassDirectionFormatter.m') diff --git a/platform/darwin/src/MGLCompassDirectionFormatter.m b/platform/darwin/src/MGLCompassDirectionFormatter.m index 1ac6a82162..99de32b777 100644 --- a/platform/darwin/src/MGLCompassDirectionFormatter.m +++ b/platform/darwin/src/MGLCompassDirectionFormatter.m @@ -1,6 +1,7 @@ #import "MGLCompassDirectionFormatter.h" #import "NSBundle+MGLAdditions.h" +#import "MGLLoggingConfiguration_Private.h" #define wrap(value, min, max) \ (fmod((fmod((value - min), (max - min)) + (max - min)), (max - min)) + min) @@ -95,7 +96,7 @@ NSLocalizedStringWithDefaultValue(@"COMPASS_NbW_LONG", @"Foundation", nil, @"north by west", @"North by west, long"), ]; - NSAssert(shortStrings.count == longStrings.count, @"Long and short compass direction string arrays must have the same size."); + MGLAssert(shortStrings.count == longStrings.count, @"Long and short compass direction string arrays must have the same size."); }); NSInteger cardinalPoint = wrap(round(wrap(direction, 0, 360) / 360 * shortStrings.count), 0, shortStrings.count); @@ -117,7 +118,7 @@ } - (BOOL)getObjectValue:(out id __nullable * __nullable)obj forString:(NSString *)string errorDescription:(out NSString * __nullable * __nullable)error { - NSAssert(NO, @"-getObjectValue:forString:errorDescription: has not been implemented"); + MGLAssert(NO, @"-getObjectValue:forString:errorDescription: has not been implemented"); return NO; } -- cgit v1.2.1