From bc7c65f03ba259effc947e17c05ce3b9232bd2db Mon Sep 17 00:00:00 2001 From: Arne Harren Date: Thu, 27 Sep 2012 21:47:36 +0200 Subject: [PATCH] Switch to an embedded variant of LibComponentLogging with prefix RK --- Code/CoreData/RKEntityByAttributeCache.m | 2 +- Code/CoreData/RKEntityMapping.m | 2 +- .../RKFetchRequestManagedObjectCache.m | 2 +- Code/CoreData/RKInMemoryManagedObjectCache.m | 2 +- Code/CoreData/RKManagedObjectImporter.m | 2 +- Code/CoreData/RKManagedObjectStore.m | 2 +- .../RKManagedObjectThreadSafeInvocation.m | 2 +- .../RKObjectPropertyInspector+CoreData.m | 2 +- .../RKRelationshipConnectionOperation.m | 2 +- Code/Network/RKHTTPRequestOperation.m | 10 +- .../Network/RKManagedObjectRequestOperation.m | 2 +- Code/Network/RKObjectParameterization.m | 2 +- Code/Network/RKObjectRequestOperation.m | 2 +- Code/Network/RKResponseMapperOperation.m | 2 +- Code/ObjectMapping/RKDynamicMapping.m | 2 +- Code/ObjectMapping/RKMapperOperation.m | 2 +- Code/ObjectMapping/RKMappingOperation.m | 2 +- Code/ObjectMapping/RKPropertyInspector.m | 2 +- Code/RestKit.h | 2 +- Code/Search/RKSearchIndexer.m | 2 +- Code/Search/RKSearchWord.m | 2 +- Code/Support/RKLog.h | 52 ++-- Code/Support/RKLog.m | 6 +- Code/Support/RKMIMETypeSerialization.m | 2 +- Code/Support/lcl_config_components.h | 66 ----- Code/Support/lcl_config_components_RK.h | 66 +++++ ...xtensions.h => lcl_config_extensions_RK.h} | 2 +- ...config_logger.h => lcl_config_logger_RK.h} | 4 +- Code/Testing/RKTestFactory.m | 8 +- Code/Testing/RKTestResponseLoader.m | 2 +- RestKit.xcodeproj/project.pbxproj | 102 ++++---- .../RKObjectMappingOperationTest.m | 2 +- .../Core/{lcl.h => lcl_RK.h} | 234 +++++++++--------- .../Core/{lcl.m => lcl_RK.m} | 88 +++---- .../Core/lcl_config_components.template.h | 69 ------ .../Core/lcl_config_extensions.template.h | 35 --- .../Core/lcl_config_logger.template.h | 80 ------ .../NSLog/{LCLNSLog.h => LCLNSLog_RK.h} | 44 ++-- .../NSLog/{LCLNSLog.m => LCLNSLog_RK.m} | 2 +- Vendor/iso8601parser/ISO8601DateFormatter.m | 2 +- 40 files changed, 357 insertions(+), 559 deletions(-) delete mode 100644 Code/Support/lcl_config_components.h create mode 100644 Code/Support/lcl_config_components_RK.h rename Code/Support/{lcl_config_extensions.h => lcl_config_extensions_RK.h} (95%) rename Code/Support/{lcl_config_logger.h => lcl_config_logger_RK.h} (93%) rename Vendor/LibComponentLogging/Core/{lcl.h => lcl_RK.h} (54%) rename Vendor/LibComponentLogging/Core/{lcl.m => lcl_RK.m} (54%) delete mode 100644 Vendor/LibComponentLogging/Core/lcl_config_components.template.h delete mode 100644 Vendor/LibComponentLogging/Core/lcl_config_extensions.template.h delete mode 100644 Vendor/LibComponentLogging/Core/lcl_config_logger.template.h rename Vendor/LibComponentLogging/NSLog/{LCLNSLog.h => LCLNSLog_RK.h} (64%) rename Vendor/LibComponentLogging/NSLog/{LCLNSLog.m => LCLNSLog_RK.m} (98%) diff --git a/Code/CoreData/RKEntityByAttributeCache.m b/Code/CoreData/RKEntityByAttributeCache.m index 385c27b27b..709e911820 100644 --- a/Code/CoreData/RKEntityByAttributeCache.m +++ b/Code/CoreData/RKEntityByAttributeCache.m @@ -18,7 +18,7 @@ // Set Logging Component #undef RKLogComponent -#define RKLogComponent lcl_cRestKitCoreDataCache +#define RKLogComponent RKlcl_cRestKitCoreDataCache @interface RKEntityByAttributeCache () @property (nonatomic, strong) NSMutableDictionary *attributeValuesToObjectIDs; diff --git a/Code/CoreData/RKEntityMapping.m b/Code/CoreData/RKEntityMapping.m index 950cb2a6b9..2f3c034923 100644 --- a/Code/CoreData/RKEntityMapping.m +++ b/Code/CoreData/RKEntityMapping.m @@ -28,7 +28,7 @@ // Set Logging Component #undef RKLogComponent -#define RKLogComponent lcl_cRestKitCoreData +#define RKLogComponent RKlcl_cRestKitCoreData // Implemented in RKMappingOperation BOOL RKValueIsEqualToValue(id sourceValue, id destinationValue); diff --git a/Code/CoreData/RKFetchRequestManagedObjectCache.m b/Code/CoreData/RKFetchRequestManagedObjectCache.m index 139fee40b8..b96251d07b 100644 --- a/Code/CoreData/RKFetchRequestManagedObjectCache.m +++ b/Code/CoreData/RKFetchRequestManagedObjectCache.m @@ -14,7 +14,7 @@ // Set Logging Component #undef RKLogComponent -#define RKLogComponent lcl_cRestKitCoreData +#define RKLogComponent RKlcl_cRestKitCoreData @implementation RKFetchRequestManagedObjectCache diff --git a/Code/CoreData/RKInMemoryManagedObjectCache.m b/Code/CoreData/RKInMemoryManagedObjectCache.m index 3a27689588..ef5a98a817 100644 --- a/Code/CoreData/RKInMemoryManagedObjectCache.m +++ b/Code/CoreData/RKInMemoryManagedObjectCache.m @@ -14,7 +14,7 @@ // Set Logging Component #undef RKLogComponent -#define RKLogComponent lcl_cRestKitCoreData +#define RKLogComponent RKlcl_cRestKitCoreData //static NSString * const RKInMemoryObjectManagedObjectCacheThreadDictionaryKey = @"RKInMemoryObjectManagedObjectCacheThreadDictionaryKey"; diff --git a/Code/CoreData/RKManagedObjectImporter.m b/Code/CoreData/RKManagedObjectImporter.m index ee2172896d..138ffc73ac 100644 --- a/Code/CoreData/RKManagedObjectImporter.m +++ b/Code/CoreData/RKManagedObjectImporter.m @@ -32,7 +32,7 @@ // Set Logging Component #undef RKLogComponent -#define RKLogComponent lcl_cRestKitCoreData +#define RKLogComponent RKlcl_cRestKitCoreData @interface RKManagedObjectImporter () @property (nonatomic, strong, readwrite) NSManagedObjectModel *managedObjectModel; diff --git a/Code/CoreData/RKManagedObjectStore.m b/Code/CoreData/RKManagedObjectStore.m index b48baeb213..a1bb63f1f9 100644 --- a/Code/CoreData/RKManagedObjectStore.m +++ b/Code/CoreData/RKManagedObjectStore.m @@ -29,7 +29,7 @@ // Set Logging Component #undef RKLogComponent -#define RKLogComponent lcl_cRestKitCoreData +#define RKLogComponent RKlcl_cRestKitCoreData NSString * const RKSQLitePersistentStoreSeedDatabasePathOption = @"RKSQLitePersistentStoreSeedDatabasePathOption"; NSString * const RKManagedObjectStoreDidFailSaveNotification = @"RKManagedObjectStoreDidFailSaveNotification"; diff --git a/Code/CoreData/RKManagedObjectThreadSafeInvocation.m b/Code/CoreData/RKManagedObjectThreadSafeInvocation.m index 4e30cc2b5b..e305361440 100644 --- a/Code/CoreData/RKManagedObjectThreadSafeInvocation.m +++ b/Code/CoreData/RKManagedObjectThreadSafeInvocation.m @@ -23,7 +23,7 @@ // Set Logging Component #undef RKLogComponent -#define RKLogComponent lcl_cRestKitCoreData +#define RKLogComponent RKlcl_cRestKitCoreData @interface RKManagedObjectThreadSafeInvocation () @property (nonatomic, strong) NSMutableDictionary *argumentKeyPaths; diff --git a/Code/CoreData/RKObjectPropertyInspector+CoreData.m b/Code/CoreData/RKObjectPropertyInspector+CoreData.m index dbdfa57ab3..347b38199f 100644 --- a/Code/CoreData/RKObjectPropertyInspector+CoreData.m +++ b/Code/CoreData/RKObjectPropertyInspector+CoreData.m @@ -29,7 +29,7 @@ // Set Logging Component #undef RKLogComponent -#define RKLogComponent lcl_cRestKitCoreData +#define RKLogComponent RKlcl_cRestKitCoreData @implementation RKPropertyInspector (CoreData) diff --git a/Code/CoreData/RKRelationshipConnectionOperation.m b/Code/CoreData/RKRelationshipConnectionOperation.m index 07643df6e9..f1cfd0ba9e 100644 --- a/Code/CoreData/RKRelationshipConnectionOperation.m +++ b/Code/CoreData/RKRelationshipConnectionOperation.m @@ -15,7 +15,7 @@ // Set Logging Component #undef RKLogComponent -#define RKLogComponent lcl_cRestKitCoreData +#define RKLogComponent RKlcl_cRestKitCoreData @interface RKRelationshipConnectionOperation () @property (nonatomic, strong, readwrite) NSManagedObject *managedObject; diff --git a/Code/Network/RKHTTPRequestOperation.m b/Code/Network/RKHTTPRequestOperation.m index 3ab164002f..ad9f40f742 100644 --- a/Code/Network/RKHTTPRequestOperation.m +++ b/Code/Network/RKHTTPRequestOperation.m @@ -20,13 +20,13 @@ #import "RKHTTPRequestOperation.h" #import "RKLog.h" -#import "lcl.h" +#import "lcl_RK.h" #import "RKHTTPUtilities.h" #import "RKMIMETypes.h" // Set Logging Component #undef RKLogComponent -#define RKLogComponent lcl_cRestKitNetwork +#define RKLogComponent RKlcl_cRestKitNetwork @interface RKHTTPRequestOperationLogger : NSObject @@ -81,7 +81,7 @@ - (void)HTTPOperationDidStart:(NSNotification *)notification body = [NSString stringWithUTF8String:[[operation.request HTTPBody] bytes]]; } - if ((_lcl_component_level[(__lcl_log_symbol(lcl_cRestKitNetwork))]) >= (__lcl_log_symbol(lcl_vTrace))) { + if ((_RKlcl_component_level[(__RKlcl_log_symbol(RKlcl_cRestKitNetwork))]) >= (__RKlcl_log_symbol(RKlcl_vTrace))) { RKLogTrace(@"%@ '%@':\nrequest.headers=%@\nrequest.body=%@", [operation.request HTTPMethod], [[operation.request URL] absoluteString], [operation.request allHTTPHeaderFields], body); } else { RKLogInfo(@"%@ '%@'", [operation.request HTTPMethod], [[operation.request URL] absoluteString]); @@ -92,13 +92,13 @@ - (void)HTTPOperationDidFinish:(NSNotification *)notification { RKHTTPRequestOperation *operation = [notification object]; if (operation.error) { - if ((_lcl_component_level[(__lcl_log_symbol(lcl_cRestKitNetwork))]) >= (__lcl_log_symbol(lcl_vTrace))) { + if ((_RKlcl_component_level[(__RKlcl_log_symbol(RKlcl_cRestKitNetwork))]) >= (__RKlcl_log_symbol(RKlcl_vTrace))) { RKLogError(@"%@ '%@' (%ld):\nerror=%@\nresponse.body=%@", [operation.request HTTPMethod], [[operation.request URL] absoluteString], (long)[operation.response statusCode], operation.error, operation.responseString); } else { RKLogError(@"%@ '%@' (%ld): %@", [operation.request HTTPMethod], [[operation.request URL] absoluteString], (long)[operation.response statusCode], operation.error); } } else { - if ((_lcl_component_level[(__lcl_log_symbol(lcl_cRestKitNetwork))]) >= (__lcl_log_symbol(lcl_vTrace))) { + if ((_RKlcl_component_level[(__RKlcl_log_symbol(RKlcl_cRestKitNetwork))]) >= (__RKlcl_log_symbol(RKlcl_vTrace))) { RKLogTrace(@"%@ '%@' (%ld):\nresponse.headers=%@\nresponse.body=%@", [operation.request HTTPMethod], [[operation.request URL] absoluteString], (long)[operation.response statusCode], [operation.response allHeaderFields], operation.responseString); } else { RKLogInfo(@"%@ '%@' (%ld)", [operation.request HTTPMethod], [[operation.request URL] absoluteString], (long)[operation.response statusCode]); diff --git a/Code/Network/RKManagedObjectRequestOperation.m b/Code/Network/RKManagedObjectRequestOperation.m index b46670d806..1edf8db19b 100644 --- a/Code/Network/RKManagedObjectRequestOperation.m +++ b/Code/Network/RKManagedObjectRequestOperation.m @@ -28,7 +28,7 @@ // Set Logging Component #undef RKLogComponent -#define RKLogComponent lcl_cRestKitCoreData +#define RKLogComponent RKlcl_cRestKitCoreData @interface RKManagedObjectRequestOperation () // Core Data specific diff --git a/Code/Network/RKObjectParameterization.m b/Code/Network/RKObjectParameterization.m index e740c4c88f..fcd7b6a2a7 100644 --- a/Code/Network/RKObjectParameterization.m +++ b/Code/Network/RKObjectParameterization.m @@ -30,7 +30,7 @@ // Set Logging Component #undef RKLogComponent -#define RKLogComponent lcl_cRestKitNetwork +#define RKLogComponent RKlcl_cRestKitNetwork @interface RKObjectParameterization () @property (nonatomic, strong) id object; diff --git a/Code/Network/RKObjectRequestOperation.m b/Code/Network/RKObjectRequestOperation.m index b8c61073aa..510c2f9483 100644 --- a/Code/Network/RKObjectRequestOperation.m +++ b/Code/Network/RKObjectRequestOperation.m @@ -26,7 +26,7 @@ // Set Logging Component #undef RKLogComponent -#define RKLogComponent lcl_cRestKitNetwork +#define RKLogComponent RKlcl_cRestKitNetwork static inline NSString *RKDescriptionForRequest(NSURLRequest *request) { diff --git a/Code/Network/RKResponseMapperOperation.m b/Code/Network/RKResponseMapperOperation.m index eacbca5823..dd83472069 100644 --- a/Code/Network/RKResponseMapperOperation.m +++ b/Code/Network/RKResponseMapperOperation.m @@ -29,7 +29,7 @@ // Set Logging Component #undef RKLogComponent -#define RKLogComponent lcl_cRestKitNetwork +#define RKLogComponent RKlcl_cRestKitNetwork // Defined in RKObjectManager.h NSURL *RKBaseURLAssociatedWithURL(NSURL *URL); diff --git a/Code/ObjectMapping/RKDynamicMapping.m b/Code/ObjectMapping/RKDynamicMapping.m index 757d633323..fa81d36f1e 100644 --- a/Code/ObjectMapping/RKDynamicMapping.m +++ b/Code/ObjectMapping/RKDynamicMapping.m @@ -24,7 +24,7 @@ // Set Logging Component #undef RKLogComponent -#define RKLogComponent lcl_cRestKitObjectMapping +#define RKLogComponent RKlcl_cRestKitObjectMapping @interface RKDynamicMapping () @property (nonatomic, strong) NSMutableArray *matchers; diff --git a/Code/ObjectMapping/RKMapperOperation.m b/Code/ObjectMapping/RKMapperOperation.m index afcaa4f451..baadb16f1f 100644 --- a/Code/ObjectMapping/RKMapperOperation.m +++ b/Code/ObjectMapping/RKMapperOperation.m @@ -30,7 +30,7 @@ // Set Logging Component #undef RKLogComponent -#define RKLogComponent lcl_cRestKitObjectMapping +#define RKLogComponent RKlcl_cRestKitObjectMapping static NSString *RKDelegateKeyPathFromKeyPath(NSString *keyPath) { diff --git a/Code/ObjectMapping/RKMappingOperation.m b/Code/ObjectMapping/RKMappingOperation.m index eec2113f28..798303587c 100644 --- a/Code/ObjectMapping/RKMappingOperation.m +++ b/Code/ObjectMapping/RKMappingOperation.m @@ -32,7 +32,7 @@ // Set Logging Component #undef RKLogComponent -#define RKLogComponent lcl_cRestKitObjectMapping +#define RKLogComponent RKlcl_cRestKitObjectMapping // Temporary home for object equivalancy tests BOOL RKValueIsEqualToValue(id sourceValue, id destinationValue); diff --git a/Code/ObjectMapping/RKPropertyInspector.m b/Code/ObjectMapping/RKPropertyInspector.m index af8e56b284..9796435d12 100644 --- a/Code/ObjectMapping/RKPropertyInspector.m +++ b/Code/ObjectMapping/RKPropertyInspector.m @@ -24,7 +24,7 @@ // Set Logging Component #undef RKLogComponent -#define RKLogComponent lcl_cRestKitObjectMapping +#define RKLogComponent RKlcl_cRestKitObjectMapping @implementation RKPropertyInspector diff --git a/Code/RestKit.h b/Code/RestKit.h index f80f7ab71c..55aa299773 100644 --- a/Code/RestKit.h +++ b/Code/RestKit.h @@ -31,4 +31,4 @@ to use RKLog() in their own app. */ #undef RKLogComponent -#define RKLogComponent lcl_cApp +#define RKLogComponent RKlcl_cApp diff --git a/Code/Search/RKSearchIndexer.m b/Code/Search/RKSearchIndexer.m index 0319a20e00..eeac801082 100644 --- a/Code/Search/RKSearchIndexer.m +++ b/Code/Search/RKSearchIndexer.m @@ -14,7 +14,7 @@ // Set Logging Component #undef RKLogComponent -#define RKLogComponent lcl_cRestKitSearch +#define RKLogComponent RKlcl_cRestKitSearch NSString * const RKSearchableAttributeNamesUserInfoKey = @"RestKitSearchableAttributes"; diff --git a/Code/Search/RKSearchWord.m b/Code/Search/RKSearchWord.m index ae59ed0a1e..9853728ef2 100644 --- a/Code/Search/RKSearchWord.m +++ b/Code/Search/RKSearchWord.m @@ -23,7 +23,7 @@ // Set Logging Component #undef RKLogComponent -#define RKLogComponent lcl_cRestKitCoreData +#define RKLogComponent RKlcl_cRestKitCoreData @implementation RKSearchWord diff --git a/Code/Support/RKLog.h b/Code/Support/RKLog.h index ac42d38ffc..07a75ad37c 100644 --- a/Code/Support/RKLog.h +++ b/Code/Support/RKLog.h @@ -21,10 +21,10 @@ /** RestKit Logging is based on the LibComponentLogging framework - @see lcl_config_components.h - @see lcl_config_logger.h + @see lcl_config_components_RK.h + @see lcl_config_logger_RK.h */ -#import "lcl.h" +#import "lcl_RK.h" /** RKLogComponent defines the active component within any given portion of RestKit @@ -35,7 +35,7 @@ The component can be undef'd and redefined to change the active logging component. */ -#define RKLogComponent lcl_cRestKit +#define RKLogComponent RKlcl_cRestKit /** The logging macros. These macros will log to the currently active logging component @@ -44,10 +44,10 @@ For example, in the `RKMappingOperation` class we would redefine the RKLogComponent: #undef RKLogComponent - #define RKLogComponent lcl_cRestKitObjectMapping + #define RKLogComponent RKlcl_cRestKitObjectMapping - The lcl_c prefix is the LibComponentLogging data structure identifying the logging component - we want to target within this portion of the codebase. See lcl_config_component.h for reference. + The RKlcl_c prefix is the LibComponentLogging data structure identifying the logging component + we want to target within this portion of the codebase. See lcl_config_component_RK.h for reference. Having defined the logging component, invoking the logger via: @@ -61,35 +61,35 @@ than the level the message was logged at (in this case, Info). */ #define RKLogCritical(...) \ -lcl_log(RKLogComponent, lcl_vCritical, @"" __VA_ARGS__) +RKlcl_log(RKLogComponent, RKlcl_vCritical, @"" __VA_ARGS__) #define RKLogError(...) \ -lcl_log(RKLogComponent, lcl_vError, @"" __VA_ARGS__) +RKlcl_log(RKLogComponent, RKlcl_vError, @"" __VA_ARGS__) #define RKLogWarning(...) \ -lcl_log(RKLogComponent, lcl_vWarning, @"" __VA_ARGS__) +RKlcl_log(RKLogComponent, RKlcl_vWarning, @"" __VA_ARGS__) #define RKLogInfo(...) \ -lcl_log(RKLogComponent, lcl_vInfo, @"" __VA_ARGS__) +RKlcl_log(RKLogComponent, RKlcl_vInfo, @"" __VA_ARGS__) #define RKLogDebug(...) \ -lcl_log(RKLogComponent, lcl_vDebug, @"" __VA_ARGS__) +RKlcl_log(RKLogComponent, RKlcl_vDebug, @"" __VA_ARGS__) #define RKLogTrace(...) \ -lcl_log(RKLogComponent, lcl_vTrace, @"" __VA_ARGS__) +RKlcl_log(RKLogComponent, RKlcl_vTrace, @"" __VA_ARGS__) /** Log Level Aliases These aliases simply map the log levels defined within LibComponentLogger to something more friendly */ -#define RKLogLevelOff lcl_vOff -#define RKLogLevelCritical lcl_vCritical -#define RKLogLevelError lcl_vError -#define RKLogLevelWarning lcl_vWarning -#define RKLogLevelInfo lcl_vInfo -#define RKLogLevelDebug lcl_vDebug -#define RKLogLevelTrace lcl_vTrace +#define RKLogLevelOff RKlcl_vOff +#define RKLogLevelCritical RKlcl_vCritical +#define RKLogLevelError RKlcl_vError +#define RKLogLevelWarning RKlcl_vWarning +#define RKLogLevelInfo RKlcl_vInfo +#define RKLogLevelDebug RKlcl_vDebug +#define RKLogLevelTrace RKlcl_vTrace /** Alias the LibComponentLogger logging configuration method. Also ensures logging @@ -107,7 +107,7 @@ lcl_log(RKLogComponent, lcl_vTrace, @"" __VA_ARGS__) */ #define RKLogConfigureByName(name, level) \ RKLogInitialize(); \ -lcl_configure_by_name(name, level); +RKlcl_configure_by_name(name, level); /** Alias for configuring the LibComponentLogger logging component for the App. This @@ -116,7 +116,7 @@ lcl_configure_by_name(name, level); */ #define RKLogSetAppLoggingLevel(level) \ RKLogInitialize(); \ -lcl_configure_by_name("App", level); +RKlcl_configure_by_name("App", level); /** Temporarily changes the logging level for the specified component and executes the block. Any logging @@ -125,8 +125,8 @@ lcl_configure_by_name("App", level); */ #define RKLogToComponentWithLevelWhileExecutingBlock(_component, _level, _block) \ do { \ - int _currentLevel = _lcl_component_level[_component]; \ - lcl_configure_by_component(_component, _level); \ + int _currentLevel = _RKlcl_component_level[_component]; \ + RKlcl_configure_by_component(_component, _level); \ @try { \ _block(); \ } \ @@ -134,7 +134,7 @@ lcl_configure_by_name("App", level); @throw; \ } \ @finally { \ - lcl_configure_by_component(_component, _currentLevel); \ + RKlcl_configure_by_component(_component, _currentLevel); \ } \ } while (false); @@ -192,7 +192,7 @@ void RKLogInitialize(void); Define an environment variable named RKLogLevel.RestKit.Network and set its value to "Trace" - See lcl_config_components.h for configurable RestKit logging components. + See lcl_config_components_RK.h for configurable RestKit logging components. Valid values are the following: Default or 0 diff --git a/Code/Support/RKLog.m b/Code/Support/RKLog.m index bd60f4644e..ca160162f8 100644 --- a/Code/Support/RKLog.m +++ b/Code/Support/RKLog.m @@ -27,8 +27,8 @@ void RKLogInitialize(void) { if (loggingInitialized == NO) { - lcl_configure_by_name("RestKit*", RKLogLevelDefault); - lcl_configure_by_name("App", RKLogLevelDefault); + RKlcl_configure_by_name("RestKit*", RKLogLevelDefault); + RKlcl_configure_by_name("App", RKLogLevelDefault); RKLogInfo(@"RestKit initialized..."); loggingInitialized = YES; } @@ -152,7 +152,7 @@ void RKLogIntegerAsBinary(NSUInteger bitMask) void RKLogCoreDataError(NSError *error) { - RKLogToComponentWithLevelWhileExecutingBlock(lcl_cRestKitCoreData, RKLogLevelError, ^{ + RKLogToComponentWithLevelWhileExecutingBlock(RKlcl_cRestKitCoreData, RKLogLevelError, ^{ RKLogValidationError(error); }); } diff --git a/Code/Support/RKMIMETypeSerialization.m b/Code/Support/RKMIMETypeSerialization.m index 948a922c68..1d8f91a3ba 100644 --- a/Code/Support/RKMIMETypeSerialization.m +++ b/Code/Support/RKMIMETypeSerialization.m @@ -26,7 +26,7 @@ // Define logging component #undef RKLogComponent -#define RKLogComponent lcl_cRestKitSupport +#define RKLogComponent RKlcl_cRestKitSupport @interface RKMIMETypeSerializationRegistration : NSObject diff --git a/Code/Support/lcl_config_components.h b/Code/Support/lcl_config_components.h deleted file mode 100644 index 7d8ea257a6..0000000000 --- a/Code/Support/lcl_config_components.h +++ /dev/null @@ -1,66 +0,0 @@ -// -// lcl_config_components.h -// RestKit -// -// Created by Blake Watters on 6/8/11. -// Copyright (c) 2009-2012 RestKit. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -// -// The lcl_config_components.h file is used to define the application's log -// components. -// -// Use the code -// -// _lcl_component(,
, ) -// -// for defining a log component, where -// -// - is the unique name of a log component which is used in calls -// to lcl_log etc. A symbol 'lcl_c' is automatically created for -// each log component. -// -// -
is a C string in UTF-8 which should be used by a logging back-end -// when writing a log message for the log component. The header is a technical -// key for identifying a log component's messages. It is recommended to use -// a 'Reverse ICANN' naming scheme when the header contains grouping -// information, e.g. 'example.main.component1'. -// -// - is a C string in UTF-8 which contains the name of the log component -// and its grouping information in a non-technical, human-readable way -// which could be used by a user interface. Groups should be separated by the -// path separator '/', e.g. 'Example/Main/Component 1'. -// - - -// -// RestKit Logging Components -// - -_lcl_component(App, "app", "App") -_lcl_component(RestKit, "restkit", "RestKit") -_lcl_component(RestKitCoreData, "restkit.core_data", "RestKit/CoreData") -_lcl_component(RestKitCoreDataCache, "restkit.core_data.cache", "RestKit/CoreData/Cache") -_lcl_component(RestKitCoreDataSearchEngine, "restkit.core_data.search_engine", "RestKit/CoreData/SearchEngine") -_lcl_component(RestKitNetwork, "restkit.network", "RestKit/Network") -_lcl_component(RestKitNetworkCache, "restkit.network.cache", "RestKit/Network/Cache") -_lcl_component(RestKitNetworkQueue, "restkit.network.queue", "RestKit/Network/Queue") -_lcl_component(RestKitNetworkReachability, "restkit.network.reachability", "RestKit/Network/Reachability") -_lcl_component(RestKitObjectMapping, "restkit.object_mapping", "RestKit/ObjectMapping") -_lcl_component(RestKitSearch, "restkit.search", "RestKit/Search") -_lcl_component(RestKitSupport, "restkit.support", "RestKit/Support") -_lcl_component(RestKitSupportParsers, "restkit.support.parsers", "RestKit/Support/Parsers") -_lcl_component(RestKitTesting, "restkit.testing", "RestKit/Testing") -_lcl_component(RestKitUI, "restkit.ui", "RestKit/UI") diff --git a/Code/Support/lcl_config_components_RK.h b/Code/Support/lcl_config_components_RK.h new file mode 100644 index 0000000000..02d9b388fd --- /dev/null +++ b/Code/Support/lcl_config_components_RK.h @@ -0,0 +1,66 @@ +// +// lcl_config_components_RK.h +// RestKit +// +// Created by Blake Watters on 6/8/11. +// Copyright (c) 2009-2012 RestKit. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +// +// The lcl_config_components_RK.h file is used to define the application's log +// components. +// +// Use the code +// +// _RKlcl_component(,
, ) +// +// for defining a log component, where +// +// - is the unique name of a log component which is used in calls +// to RKlcl_log etc. A symbol 'RKlcl_c' is automatically created for +// each log component. +// +// -
is a C string in UTF-8 which should be used by a logging back-end +// when writing a log message for the log component. The header is a technical +// key for identifying a log component's messages. It is recommended to use +// a 'Reverse ICANN' naming scheme when the header contains grouping +// information, e.g. 'example.main.component1'. +// +// - is a C string in UTF-8 which contains the name of the log component +// and its grouping information in a non-technical, human-readable way +// which could be used by a user interface. Groups should be separated by the +// path separator '/', e.g. 'Example/Main/Component 1'. +// + + +// +// RestKit Logging Components +// + +_RKlcl_component(App, "app", "App") +_RKlcl_component(RestKit, "restkit", "RestKit") +_RKlcl_component(RestKitCoreData, "restkit.core_data", "RestKit/CoreData") +_RKlcl_component(RestKitCoreDataCache, "restkit.core_data.cache", "RestKit/CoreData/Cache") +_RKlcl_component(RestKitCoreDataSearchEngine, "restkit.core_data.search_engine", "RestKit/CoreData/SearchEngine") +_RKlcl_component(RestKitNetwork, "restkit.network", "RestKit/Network") +_RKlcl_component(RestKitNetworkCache, "restkit.network.cache", "RestKit/Network/Cache") +_RKlcl_component(RestKitNetworkQueue, "restkit.network.queue", "RestKit/Network/Queue") +_RKlcl_component(RestKitNetworkReachability, "restkit.network.reachability", "RestKit/Network/Reachability") +_RKlcl_component(RestKitObjectMapping, "restkit.object_mapping", "RestKit/ObjectMapping") +_RKlcl_component(RestKitSearch, "restkit.search", "RestKit/Search") +_RKlcl_component(RestKitSupport, "restkit.support", "RestKit/Support") +_RKlcl_component(RestKitSupportParsers, "restkit.support.parsers", "RestKit/Support/Parsers") +_RKlcl_component(RestKitTesting, "restkit.testing", "RestKit/Testing") +_RKlcl_component(RestKitUI, "restkit.ui", "RestKit/UI") diff --git a/Code/Support/lcl_config_extensions.h b/Code/Support/lcl_config_extensions_RK.h similarity index 95% rename from Code/Support/lcl_config_extensions.h rename to Code/Support/lcl_config_extensions_RK.h index 358ea2f41b..62293431fc 100644 --- a/Code/Support/lcl_config_extensions.h +++ b/Code/Support/lcl_config_extensions_RK.h @@ -1,5 +1,5 @@ // -// lcl_config_extensions.h +// lcl_config_extensions_RK.h // RestKit // // Created by Blake Watters on 6/8/11. diff --git a/Code/Support/lcl_config_logger.h b/Code/Support/lcl_config_logger_RK.h similarity index 93% rename from Code/Support/lcl_config_logger.h rename to Code/Support/lcl_config_logger_RK.h index 44eabdcc6c..02d964ac04 100644 --- a/Code/Support/lcl_config_logger.h +++ b/Code/Support/lcl_config_logger_RK.h @@ -1,5 +1,5 @@ // -// lcl_config_logger.h +// lcl_config_logger_RK.h // RestKit // // Created by Blake Watters on 6/8/11. @@ -19,4 +19,4 @@ // // NSLog -#import "LCLNSLog.h" +#import "LCLNSLog_RK.h" diff --git a/Code/Testing/RKTestFactory.m b/Code/Testing/RKTestFactory.m index 990a3b5acc..57bc066f11 100644 --- a/Code/Testing/RKTestFactory.m +++ b/Code/Testing/RKTestFactory.m @@ -82,8 +82,8 @@ - (void)defineDefaultFactories [self defineFactory:RKTestFactoryDefaultNamesClient withBlock:^id { __block AFHTTPClient *client; - RKLogSilenceComponentWhileExecutingBlock(lcl_cRestKitNetworkReachability, ^{ - RKLogSilenceComponentWhileExecutingBlock(lcl_cRestKitSupport, ^{ + RKLogSilenceComponentWhileExecutingBlock(RKlcl_cRestKitNetworkReachability, ^{ + RKLogSilenceComponentWhileExecutingBlock(RKlcl_cRestKitSupport, ^{ client = [AFHTTPClient clientWithBaseURL:self.baseURL]; }); }); @@ -94,8 +94,8 @@ - (void)defineDefaultFactories [self defineFactory:RKTestFactoryDefaultNamesObjectManager withBlock:^id { __block RKObjectManager *objectManager; - RKLogSilenceComponentWhileExecutingBlock(lcl_cRestKitNetworkReachability, ^{ - RKLogSilenceComponentWhileExecutingBlock(lcl_cRestKitSupport, ^{ + RKLogSilenceComponentWhileExecutingBlock(RKlcl_cRestKitNetworkReachability, ^{ + RKLogSilenceComponentWhileExecutingBlock(RKlcl_cRestKitSupport, ^{ objectManager = [RKObjectManager managerWithBaseURL:self.baseURL]; }); }); diff --git a/Code/Testing/RKTestResponseLoader.m b/Code/Testing/RKTestResponseLoader.m index 5b6ebaa1b8..e0f6216bc4 100644 --- a/Code/Testing/RKTestResponseLoader.m +++ b/Code/Testing/RKTestResponseLoader.m @@ -23,7 +23,7 @@ // Set Logging Component #undef RKLogComponent -#define RKLogComponent lcl_cRestKitTesting +#define RKLogComponent RKlcl_cRestKitTesting NSString * const RKTestResponseLoaderTimeoutException = @"RKTestResponseLoaderTimeoutException"; diff --git a/RestKit.xcodeproj/project.pbxproj b/RestKit.xcodeproj/project.pbxproj index 9d6e2dccaa..58e082856e 100644 --- a/RestKit.xcodeproj/project.pbxproj +++ b/RestKit.xcodeproj/project.pbxproj @@ -98,9 +98,9 @@ 25160E25145650490060A5C5 /* RKRelationshipMapping.h in Headers */ = {isa = PBXBuildFile; fileRef = 25160D98145650490060A5C5 /* RKRelationshipMapping.h */; settings = {ATTRIBUTES = (Public, ); }; }; 25160E26145650490060A5C5 /* RKRelationshipMapping.m in Sources */ = {isa = PBXBuildFile; fileRef = 25160D99145650490060A5C5 /* RKRelationshipMapping.m */; }; 25160E2E145650490060A5C5 /* RestKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 25160DA1145650490060A5C5 /* RestKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 25160E31145650490060A5C5 /* lcl_config_components.h in Headers */ = {isa = PBXBuildFile; fileRef = 25160DA5145650490060A5C5 /* lcl_config_components.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 25160E32145650490060A5C5 /* lcl_config_extensions.h in Headers */ = {isa = PBXBuildFile; fileRef = 25160DA6145650490060A5C5 /* lcl_config_extensions.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 25160E33145650490060A5C5 /* lcl_config_logger.h in Headers */ = {isa = PBXBuildFile; fileRef = 25160DA7145650490060A5C5 /* lcl_config_logger.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 25160E31145650490060A5C5 /* lcl_config_components_RK.h in Headers */ = {isa = PBXBuildFile; fileRef = 25160DA5145650490060A5C5 /* lcl_config_components_RK.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 25160E32145650490060A5C5 /* lcl_config_extensions_RK.h in Headers */ = {isa = PBXBuildFile; fileRef = 25160DA6145650490060A5C5 /* lcl_config_extensions_RK.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 25160E33145650490060A5C5 /* lcl_config_logger_RK.h in Headers */ = {isa = PBXBuildFile; fileRef = 25160DA7145650490060A5C5 /* lcl_config_logger_RK.h */; settings = {ATTRIBUTES = (Public, ); }; }; 25160E44145650490060A5C5 /* RestKit-Prefix.pch in Headers */ = {isa = PBXBuildFile; fileRef = 25160DBB145650490060A5C5 /* RestKit-Prefix.pch */; settings = {ATTRIBUTES = (); }; }; 25160E47145650490060A5C5 /* RKDotNetDateFormatter.h in Headers */ = {isa = PBXBuildFile; fileRef = 25160DBE145650490060A5C5 /* RKDotNetDateFormatter.h */; settings = {ATTRIBUTES = (Public, ); }; }; 25160E48145650490060A5C5 /* RKDotNetDateFormatter.m in Sources */ = {isa = PBXBuildFile; fileRef = 25160DBF145650490060A5C5 /* RKDotNetDateFormatter.m */; }; @@ -114,20 +114,14 @@ 25160E79145651060060A5C5 /* SenTestingKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 25160D2714564E820060A5C5 /* SenTestingKit.framework */; }; 25160E7A145651060060A5C5 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 25160E63145651060060A5C5 /* Cocoa.framework */; }; 25160E7D145651060060A5C5 /* RestKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 25160E62145651060060A5C5 /* RestKit.framework */; }; - 25160EE21456532C0060A5C5 /* lcl.h in Headers */ = {isa = PBXBuildFile; fileRef = 25160EA21456532C0060A5C5 /* lcl.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 25160EE31456532C0060A5C5 /* lcl.h in Headers */ = {isa = PBXBuildFile; fileRef = 25160EA21456532C0060A5C5 /* lcl.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 25160EE41456532C0060A5C5 /* lcl.m in Sources */ = {isa = PBXBuildFile; fileRef = 25160EA31456532C0060A5C5 /* lcl.m */; }; - 25160EE51456532C0060A5C5 /* lcl.m in Sources */ = {isa = PBXBuildFile; fileRef = 25160EA31456532C0060A5C5 /* lcl.m */; }; - 25160EE61456532C0060A5C5 /* lcl_config_components.template.h in Headers */ = {isa = PBXBuildFile; fileRef = 25160EA41456532C0060A5C5 /* lcl_config_components.template.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 25160EE71456532C0060A5C5 /* lcl_config_components.template.h in Headers */ = {isa = PBXBuildFile; fileRef = 25160EA41456532C0060A5C5 /* lcl_config_components.template.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 25160EE81456532C0060A5C5 /* lcl_config_extensions.template.h in Headers */ = {isa = PBXBuildFile; fileRef = 25160EA51456532C0060A5C5 /* lcl_config_extensions.template.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 25160EE91456532C0060A5C5 /* lcl_config_extensions.template.h in Headers */ = {isa = PBXBuildFile; fileRef = 25160EA51456532C0060A5C5 /* lcl_config_extensions.template.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 25160EEA1456532C0060A5C5 /* lcl_config_logger.template.h in Headers */ = {isa = PBXBuildFile; fileRef = 25160EA61456532C0060A5C5 /* lcl_config_logger.template.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 25160EEB1456532C0060A5C5 /* lcl_config_logger.template.h in Headers */ = {isa = PBXBuildFile; fileRef = 25160EA61456532C0060A5C5 /* lcl_config_logger.template.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 25160EF81456532C0060A5C5 /* LCLNSLog.h in Headers */ = {isa = PBXBuildFile; fileRef = 25160EB01456532C0060A5C5 /* LCLNSLog.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 25160EF91456532C0060A5C5 /* LCLNSLog.h in Headers */ = {isa = PBXBuildFile; fileRef = 25160EB01456532C0060A5C5 /* LCLNSLog.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 25160EFA1456532C0060A5C5 /* LCLNSLog.m in Sources */ = {isa = PBXBuildFile; fileRef = 25160EB11456532C0060A5C5 /* LCLNSLog.m */; }; - 25160EFB1456532C0060A5C5 /* LCLNSLog.m in Sources */ = {isa = PBXBuildFile; fileRef = 25160EB11456532C0060A5C5 /* LCLNSLog.m */; }; + 25160EE21456532C0060A5C5 /* lcl_RK.h in Headers */ = {isa = PBXBuildFile; fileRef = 25160EA21456532C0060A5C5 /* lcl_RK.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 25160EE31456532C0060A5C5 /* lcl_RK.h in Headers */ = {isa = PBXBuildFile; fileRef = 25160EA21456532C0060A5C5 /* lcl_RK.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 25160EE41456532C0060A5C5 /* lcl_RK.m in Sources */ = {isa = PBXBuildFile; fileRef = 25160EA31456532C0060A5C5 /* lcl_RK.m */; }; + 25160EE51456532C0060A5C5 /* lcl_RK.m in Sources */ = {isa = PBXBuildFile; fileRef = 25160EA31456532C0060A5C5 /* lcl_RK.m */; }; + 25160EF81456532C0060A5C5 /* LCLNSLog_RK.h in Headers */ = {isa = PBXBuildFile; fileRef = 25160EB01456532C0060A5C5 /* LCLNSLog_RK.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 25160EF91456532C0060A5C5 /* LCLNSLog_RK.h in Headers */ = {isa = PBXBuildFile; fileRef = 25160EB01456532C0060A5C5 /* LCLNSLog_RK.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 25160EFA1456532C0060A5C5 /* LCLNSLog_RK.m in Sources */ = {isa = PBXBuildFile; fileRef = 25160EB11456532C0060A5C5 /* LCLNSLog_RK.m */; }; + 25160EFB1456532C0060A5C5 /* LCLNSLog_RK.m in Sources */ = {isa = PBXBuildFile; fileRef = 25160EB11456532C0060A5C5 /* LCLNSLog_RK.m */; }; 25160F081456532C0060A5C5 /* SOCKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 25160EBD1456532C0060A5C5 /* SOCKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; 25160F091456532C0060A5C5 /* SOCKit.h in Headers */ = {isa = PBXBuildFile; fileRef = 25160EBD1456532C0060A5C5 /* SOCKit.h */; settings = {ATTRIBUTES = (Public, ); }; }; 25160F0A1456532C0060A5C5 /* SOCKit.m in Sources */ = {isa = PBXBuildFile; fileRef = 25160EBE1456532C0060A5C5 /* SOCKit.m */; settings = {COMPILER_FLAGS = "-fno-objc-arc"; }; }; @@ -165,9 +159,9 @@ 25160F7A145655D10060A5C5 /* RKObjectPropertyInspector+CoreData.m in Sources */ = {isa = PBXBuildFile; fileRef = 25160D57145650490060A5C5 /* RKObjectPropertyInspector+CoreData.m */; }; 25160F7C145657220060A5C5 /* SystemConfiguration.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 25160F7B145657220060A5C5 /* SystemConfiguration.framework */; }; 25160F7E145657300060A5C5 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 25160F7D1456572F0060A5C5 /* Cocoa.framework */; }; - 25160F85145657650060A5C5 /* lcl_config_components.h in Headers */ = {isa = PBXBuildFile; fileRef = 25160DA5145650490060A5C5 /* lcl_config_components.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 25160F86145657650060A5C5 /* lcl_config_extensions.h in Headers */ = {isa = PBXBuildFile; fileRef = 25160DA6145650490060A5C5 /* lcl_config_extensions.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 25160F87145657650060A5C5 /* lcl_config_logger.h in Headers */ = {isa = PBXBuildFile; fileRef = 25160DA7145650490060A5C5 /* lcl_config_logger.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 25160F85145657650060A5C5 /* lcl_config_components_RK.h in Headers */ = {isa = PBXBuildFile; fileRef = 25160DA5145650490060A5C5 /* lcl_config_components_RK.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 25160F86145657650060A5C5 /* lcl_config_extensions_RK.h in Headers */ = {isa = PBXBuildFile; fileRef = 25160DA6145650490060A5C5 /* lcl_config_extensions_RK.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 25160F87145657650060A5C5 /* lcl_config_logger_RK.h in Headers */ = {isa = PBXBuildFile; fileRef = 25160DA7145650490060A5C5 /* lcl_config_logger_RK.h */; settings = {ATTRIBUTES = (Public, ); }; }; 25160F901456576C0060A5C5 /* RKDotNetDateFormatter.h in Headers */ = {isa = PBXBuildFile; fileRef = 25160DBE145650490060A5C5 /* RKDotNetDateFormatter.h */; settings = {ATTRIBUTES = (Public, ); }; }; 25160F911456576C0060A5C5 /* RKDotNetDateFormatter.m in Sources */ = {isa = PBXBuildFile; fileRef = 25160DBF145650490060A5C5 /* RKDotNetDateFormatter.m */; }; 25160F931456576C0060A5C5 /* RKLog.h in Headers */ = {isa = PBXBuildFile; fileRef = 25160DC1145650490060A5C5 /* RKLog.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -705,9 +699,9 @@ 25160D98145650490060A5C5 /* RKRelationshipMapping.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RKRelationshipMapping.h; sourceTree = ""; }; 25160D99145650490060A5C5 /* RKRelationshipMapping.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RKRelationshipMapping.m; sourceTree = ""; }; 25160DA1145650490060A5C5 /* RestKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RestKit.h; sourceTree = ""; }; - 25160DA5145650490060A5C5 /* lcl_config_components.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lcl_config_components.h; sourceTree = ""; }; - 25160DA6145650490060A5C5 /* lcl_config_extensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lcl_config_extensions.h; sourceTree = ""; }; - 25160DA7145650490060A5C5 /* lcl_config_logger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lcl_config_logger.h; sourceTree = ""; }; + 25160DA5145650490060A5C5 /* lcl_config_components_RK.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lcl_config_components_RK.h; sourceTree = ""; }; + 25160DA6145650490060A5C5 /* lcl_config_extensions_RK.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lcl_config_extensions_RK.h; sourceTree = ""; }; + 25160DA7145650490060A5C5 /* lcl_config_logger_RK.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lcl_config_logger_RK.h; sourceTree = ""; }; 25160DBB145650490060A5C5 /* RestKit-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "RestKit-Prefix.pch"; sourceTree = ""; }; 25160DBE145650490060A5C5 /* RKDotNetDateFormatter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RKDotNetDateFormatter.h; sourceTree = ""; }; 25160DBF145650490060A5C5 /* RKDotNetDateFormatter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RKDotNetDateFormatter.m; sourceTree = ""; }; @@ -724,14 +718,11 @@ 25160E67145651060060A5C5 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; }; 25160E68145651060060A5C5 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; 25160E78145651060060A5C5 /* RestKitFrameworkTests.octest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RestKitFrameworkTests.octest; sourceTree = BUILT_PRODUCTS_DIR; }; - 25160EA21456532C0060A5C5 /* lcl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lcl.h; sourceTree = ""; }; - 25160EA31456532C0060A5C5 /* lcl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = lcl.m; sourceTree = ""; }; - 25160EA41456532C0060A5C5 /* lcl_config_components.template.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lcl_config_components.template.h; sourceTree = ""; }; - 25160EA51456532C0060A5C5 /* lcl_config_extensions.template.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lcl_config_extensions.template.h; sourceTree = ""; }; - 25160EA61456532C0060A5C5 /* lcl_config_logger.template.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lcl_config_logger.template.h; sourceTree = ""; }; + 25160EA21456532C0060A5C5 /* lcl_RK.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lcl_RK.h; sourceTree = ""; }; + 25160EA31456532C0060A5C5 /* lcl_RK.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = lcl_RK.m; sourceTree = ""; }; 25160EA71456532C0060A5C5 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.md; sourceTree = ""; }; - 25160EB01456532C0060A5C5 /* LCLNSLog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LCLNSLog.h; sourceTree = ""; }; - 25160EB11456532C0060A5C5 /* LCLNSLog.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LCLNSLog.m; sourceTree = ""; }; + 25160EB01456532C0060A5C5 /* LCLNSLog_RK.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LCLNSLog_RK.h; sourceTree = ""; }; + 25160EB11456532C0060A5C5 /* LCLNSLog_RK.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LCLNSLog_RK.m; sourceTree = ""; }; 25160EBD1456532C0060A5C5 /* SOCKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SOCKit.h; sourceTree = ""; }; 25160EBE1456532C0060A5C5 /* SOCKit.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SOCKit.m; sourceTree = ""; }; 25160F161456538B0060A5C5 /* libxml2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libxml2.dylib; path = usr/lib/libxml2.dylib; sourceTree = SDKROOT; }; @@ -1279,9 +1270,9 @@ 2595B46C15F670530087A59B /* RKMIMETypeSerialization.m */, 2595B46D15F670530087A59B /* RKNSJSONSerialization.h */, 2595B46E15F670530087A59B /* RKNSJSONSerialization.m */, - 25160DA5145650490060A5C5 /* lcl_config_components.h */, - 25160DA6145650490060A5C5 /* lcl_config_extensions.h */, - 25160DA7145650490060A5C5 /* lcl_config_logger.h */, + 25160DA5145650490060A5C5 /* lcl_config_components_RK.h */, + 25160DA6145650490060A5C5 /* lcl_config_extensions_RK.h */, + 25160DA7145650490060A5C5 /* lcl_config_logger_RK.h */, 25160DBB145650490060A5C5 /* RestKit-Prefix.pch */, 25160DBE145650490060A5C5 /* RKDotNetDateFormatter.h */, 25160DBF145650490060A5C5 /* RKDotNetDateFormatter.m */, @@ -1336,11 +1327,8 @@ 25160EA11456532C0060A5C5 /* Core */ = { isa = PBXGroup; children = ( - 25160EA21456532C0060A5C5 /* lcl.h */, - 25160EA31456532C0060A5C5 /* lcl.m */, - 25160EA41456532C0060A5C5 /* lcl_config_components.template.h */, - 25160EA51456532C0060A5C5 /* lcl_config_extensions.template.h */, - 25160EA61456532C0060A5C5 /* lcl_config_logger.template.h */, + 25160EA21456532C0060A5C5 /* lcl_RK.h */, + 25160EA31456532C0060A5C5 /* lcl_RK.m */, 25160EA71456532C0060A5C5 /* README.md */, ); path = Core; @@ -1349,8 +1337,8 @@ 25160EAE1456532C0060A5C5 /* NSLog */ = { isa = PBXGroup; children = ( - 25160EB01456532C0060A5C5 /* LCLNSLog.h */, - 25160EB11456532C0060A5C5 /* LCLNSLog.m */, + 25160EB01456532C0060A5C5 /* LCLNSLog_RK.h */, + 25160EB11456532C0060A5C5 /* LCLNSLog_RK.m */, ); path = NSLog; sourceTree = ""; @@ -1886,20 +1874,17 @@ 25160E21145650490060A5C5 /* RKMappingResult.h in Headers */, 25160E23145650490060A5C5 /* RKPropertyInspector.h in Headers */, 25160E25145650490060A5C5 /* RKRelationshipMapping.h in Headers */, - 25160E31145650490060A5C5 /* lcl_config_components.h in Headers */, - 25160E32145650490060A5C5 /* lcl_config_extensions.h in Headers */, - 25160E33145650490060A5C5 /* lcl_config_logger.h in Headers */, + 25160E31145650490060A5C5 /* lcl_config_components_RK.h in Headers */, + 25160E32145650490060A5C5 /* lcl_config_extensions_RK.h in Headers */, + 25160E33145650490060A5C5 /* lcl_config_logger_RK.h in Headers */, 25160E44145650490060A5C5 /* RestKit-Prefix.pch in Headers */, 25160E47145650490060A5C5 /* RKDotNetDateFormatter.h in Headers */, 25160E4A145650490060A5C5 /* RKLog.h in Headers */, 25160E4C145650490060A5C5 /* RKMIMETypes.h in Headers */, 25160E4E145650490060A5C5 /* RKSerialization.h in Headers */, 25160E4F145650490060A5C5 /* RKPathMatcher.h in Headers */, - 25160EE21456532C0060A5C5 /* lcl.h in Headers */, - 25160EE61456532C0060A5C5 /* lcl_config_components.template.h in Headers */, - 25160EE81456532C0060A5C5 /* lcl_config_extensions.template.h in Headers */, - 25160EEA1456532C0060A5C5 /* lcl_config_logger.template.h in Headers */, - 25160EF81456532C0060A5C5 /* LCLNSLog.h in Headers */, + 25160EE21456532C0060A5C5 /* lcl_RK.h in Headers */, + 25160EF81456532C0060A5C5 /* LCLNSLog_RK.h in Headers */, 25160F081456532C0060A5C5 /* SOCKit.h in Headers */, 25160E2E145650490060A5C5 /* RestKit.h in Headers */, 25B408261491CDDC00F21111 /* RKPathUtilities.h in Headers */, @@ -1975,11 +1960,8 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 25160EE31456532C0060A5C5 /* lcl.h in Headers */, - 25160EE71456532C0060A5C5 /* lcl_config_components.template.h in Headers */, - 25160EE91456532C0060A5C5 /* lcl_config_extensions.template.h in Headers */, - 25160EEB1456532C0060A5C5 /* lcl_config_logger.template.h in Headers */, - 25160EF91456532C0060A5C5 /* LCLNSLog.h in Headers */, + 25160EE31456532C0060A5C5 /* lcl_RK.h in Headers */, + 25160EF91456532C0060A5C5 /* LCLNSLog_RK.h in Headers */, 25160F091456532C0060A5C5 /* SOCKit.h in Headers */, 25160F44145655C60060A5C5 /* RKDynamicMapping.h in Headers */, 25160F46145655C60060A5C5 /* RKErrorMessage.h in Headers */, @@ -1997,9 +1979,9 @@ 25160F75145655D10060A5C5 /* RKManagedObjectStore.h in Headers */, 25160F77145655D10060A5C5 /* RKManagedObjectThreadSafeInvocation.h in Headers */, 25160F79145655D10060A5C5 /* RKPropertyInspector+CoreData.h in Headers */, - 25160F85145657650060A5C5 /* lcl_config_components.h in Headers */, - 25160F86145657650060A5C5 /* lcl_config_extensions.h in Headers */, - 25160F87145657650060A5C5 /* lcl_config_logger.h in Headers */, + 25160F85145657650060A5C5 /* lcl_config_components_RK.h in Headers */, + 25160F86145657650060A5C5 /* lcl_config_extensions_RK.h in Headers */, + 25160F87145657650060A5C5 /* lcl_config_logger_RK.h in Headers */, 25160F901456576C0060A5C5 /* RKDotNetDateFormatter.h in Headers */, 25160F931456576C0060A5C5 /* RKLog.h in Headers */, 25160F951456576C0060A5C5 /* RKMIMETypes.h in Headers */, @@ -2388,8 +2370,8 @@ 25160E4B145650490060A5C5 /* RKLog.m in Sources */, 25160E4D145650490060A5C5 /* RKMIMETypes.m in Sources */, 25160E50145650490060A5C5 /* RKPathMatcher.m in Sources */, - 25160EE41456532C0060A5C5 /* lcl.m in Sources */, - 25160EFA1456532C0060A5C5 /* LCLNSLog.m in Sources */, + 25160EE41456532C0060A5C5 /* lcl_RK.m in Sources */, + 25160EFA1456532C0060A5C5 /* LCLNSLog_RK.m in Sources */, 25160F0A1456532C0060A5C5 /* SOCKit.m in Sources */, 25B408281491CDDC00F21111 /* RKPathUtilities.m in Sources */, 49D2759F14C9EF1E0090845D /* ISO8601DateFormatter.m in Sources */, @@ -2529,8 +2511,8 @@ buildActionMask = 2147483647; files = ( 25AE61DE15ADEF5800B319C8 /* RKConnectionMapping.m in Sources */, - 25160EE51456532C0060A5C5 /* lcl.m in Sources */, - 25160EFB1456532C0060A5C5 /* LCLNSLog.m in Sources */, + 25160EE51456532C0060A5C5 /* lcl_RK.m in Sources */, + 25160EFB1456532C0060A5C5 /* LCLNSLog_RK.m in Sources */, 25160F0B1456532C0060A5C5 /* SOCKit.m in Sources */, 25160F45145655C60060A5C5 /* RKDynamicMapping.m in Sources */, 25160F47145655C60060A5C5 /* RKErrorMessage.m in Sources */, diff --git a/Tests/Logic/ObjectMapping/RKObjectMappingOperationTest.m b/Tests/Logic/ObjectMapping/RKObjectMappingOperationTest.m index 63826e19e5..09673c65e8 100644 --- a/Tests/Logic/ObjectMapping/RKObjectMappingOperationTest.m +++ b/Tests/Logic/ObjectMapping/RKObjectMappingOperationTest.m @@ -449,7 +449,7 @@ - (void)testShouldLogADebugMessageIfTheRelationshipMappingTargetsAnArrayOfArrays [relationshipMapping addPropertyMapping:[RKAttributeMapping attributeMappingFromKeyPath:@"title" toKeyPath:@"testString"]]; [objectMapping addPropertyMapping:[RKRelationshipMapping relationshipMappingFromKeyPath:@"mediaGroups.contents" toKeyPath:@"hasMany" withMapping:relationshipMapping]];; RKMappableObject *targetObject = [RKMappableObject new]; - RKLogToComponentWithLevelWhileExecutingBlock(lcl_cRestKitObjectMapping, RKLogLevelDebug, ^ { + RKLogToComponentWithLevelWhileExecutingBlock(RKlcl_cRestKitObjectMapping, RKLogLevelDebug, ^ { RKMappingOperation *operation = [[RKMappingOperation alloc] initWithSourceObject:data destinationObject:targetObject mapping:objectMapping]; RKObjectMappingOperationDataSource *dataSource = [RKObjectMappingOperationDataSource new]; diff --git a/Vendor/LibComponentLogging/Core/lcl.h b/Vendor/LibComponentLogging/Core/lcl_RK.h similarity index 54% rename from Vendor/LibComponentLogging/Core/lcl.h rename to Vendor/LibComponentLogging/Core/lcl_RK.h index 99d3ea08ea..c4e3324ef0 100644 --- a/Vendor/LibComponentLogging/Core/lcl.h +++ b/Vendor/LibComponentLogging/Core/lcl_RK.h @@ -1,6 +1,6 @@ // // -// lcl.h -- LibComponentLogging +// lcl_RK.h -- LibComponentLogging, embedded, RestKit/RK // // // Copyright (c) 2008-2012 Arne Harren @@ -23,16 +23,16 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -#ifndef __LCL_H__ -#define __LCL_H__ +#ifndef __RKLCL_H__ +#define __RKLCL_H__ -#define _LCL_VERSION_MAJOR 1 -#define _LCL_VERSION_MINOR 3 -#define _LCL_VERSION_BUILD 1 -#define _LCL_VERSION_SUFFIX "" +#define _RKLCL_VERSION_MAJOR 1 +#define _RKLCL_VERSION_MINOR 3 +#define _RKLCL_VERSION_BUILD 1 +#define _RKLCL_VERSION_SUFFIX "" // -// lcl -- LibComponentLogging +// lcl -- LibComponentLogging, embedded, RestKit/RK // // LibComponentLogging is a logging library for Objective-C applications // with the following characteristics: @@ -65,10 +65,10 @@ // The library provides symbols for log components and log levels which work // with Xcode's code completion. All symbols, e.g. values or functions, which // are relevant when using the logging library in an application, are prefixed -// with 'lcl_'. Internal symbols, which are needed when working with meta +// with 'RKlcl_'. Internal symbols, which are needed when working with meta // data, when defining log components, or when writing a logging back-end, are -// prefixed with '_lcl_'. Internal symbols, which are only used by the logging -// library itself, are prefixed with '__lcl_'. +// prefixed with '_RKlcl_'. Internal symbols, which are only used by the logging +// library itself, are prefixed with '__RKlcl_'. // // - Meta data // The library provides public data structures which contain information about @@ -81,7 +81,7 @@ // or a logger which writes to a log file. The concrete logger is configured // at build-time. // -// Note: If the preprocessor symbol _LCL_NO_LOGGING is defined, the log macro +// Note: If the preprocessor symbol _RKLCL_NO_LOGGING is defined, the log macro // will be defined to an empty effect. // @@ -100,25 +100,25 @@ extern "C" { // -// Log levels, prefixed with 'lcl_v'. -enum _lcl_enum_level_t { - lcl_vOff = 0, +// Log levels, prefixed with 'RKlcl_v'. +enum _RKlcl_enum_level_t { + RKlcl_vOff = 0, - lcl_vCritical, // critical situation - lcl_vError, // error situation - lcl_vWarning, // warning - lcl_vInfo, // informational message - lcl_vDebug, // coarse-grained debugging information - lcl_vTrace, // fine-grained debugging information + RKlcl_vCritical, // critical situation + RKlcl_vError, // error situation + RKlcl_vWarning, // warning + RKlcl_vInfo, // informational message + RKlcl_vDebug, // coarse-grained debugging information + RKlcl_vTrace, // fine-grained debugging information - _lcl_level_t_count, - _lcl_level_t_first = 0, - _lcl_level_t_last = _lcl_level_t_count-1 + _RKlcl_level_t_count, + _RKlcl_level_t_first = 0, + _RKlcl_level_t_last = _RKlcl_level_t_count-1 }; // Log level type. -typedef uint32_t _lcl_level_t; -typedef uint8_t _lcl_level_narrow_t; +typedef uint32_t _RKlcl_level_t; +typedef uint8_t _RKlcl_level_narrow_t; // @@ -126,28 +126,28 @@ typedef uint8_t _lcl_level_narrow_t; // -// Log components, prefixed with 'lcl_c'. -enum _lcl_enum_component_t { -# define _lcl_component(_identifier, _header, _name) \ - lcl_c##_identifier, \ - __lcl_log_symbol_lcl_c##_identifier = lcl_c##_identifier, -# include "lcl_config_components.h" -# undef _lcl_component +// Log components, prefixed with 'RKlcl_c'. +enum _RKlcl_enum_component_t { +# define _RKlcl_component(_identifier, _header, _name) \ + RKlcl_c##_identifier, \ + __RKlcl_log_symbol_RKlcl_c##_identifier = RKlcl_c##_identifier, +# include "lcl_config_components_RK.h" +# undef _RKlcl_component - _lcl_component_t_count, - _lcl_component_t_first = 0, - _lcl_component_t_last = _lcl_component_t_count-1 + _RKlcl_component_t_count, + _RKlcl_component_t_first = 0, + _RKlcl_component_t_last = _RKlcl_component_t_count-1 }; // Log component type. -typedef uint32_t _lcl_component_t; +typedef uint32_t _RKlcl_component_t; // // Functions and macros. // -#ifndef _LCL_NO_IGNORE_WARNINGS +#ifndef _RKLCL_NO_IGNORE_WARNINGS # ifdef __clang__ // Ignore some warnings about variadic macros when using '-Weverything'. # pragma clang diagnostic push @@ -157,30 +157,30 @@ typedef uint32_t _lcl_component_t; # endif #endif -// lcl_log(, , [, [, [, ...]]]) +// RKlcl_log(, , [, [, [, ...]]]) // -// : a log component with prefix 'lcl_c' -// : a log level with prefix 'lcl_v' +// : a log component with prefix 'RKlcl_c' +// : a log level with prefix 'RKlcl_v' // : a format string of type NSString (may include %@) // : optional arguments required by the format string // // Logs a message for the given log component at the given log level if the // log level is active for the log component. // -// The actual logging is done by _lcl_logger which must be defined by a concrete -// logging back-end. _lcl_logger has the same signature as lcl_log. +// The actual logging is done by _RKlcl_logger which must be defined by a concrete +// logging back-end. _RKlcl_logger has the same signature as RKlcl_log. // -#ifdef _LCL_NO_LOGGING -# define lcl_log(_component, _level, _format, ...) \ +#ifdef _RKLCL_NO_LOGGING +# define RKlcl_log(_component, _level, _format, ...) \ do { \ } while (0) #else -# define lcl_log(_component, _level, _format, ...) \ +# define RKlcl_log(_component, _level, _format, ...) \ do { \ - if (((_lcl_component_level[(__lcl_log_symbol(_component))]) >= \ - (__lcl_log_symbol(_level))) \ + if (((_RKlcl_component_level[(__RKlcl_log_symbol(_component))]) >= \ + (__RKlcl_log_symbol(_level))) \ ) { \ - _lcl_logger(_component, \ + _RKlcl_logger(_component, \ _level, \ _format, \ ##__VA_ARGS__); \ @@ -188,10 +188,10 @@ typedef uint32_t _lcl_component_t; } while (0) #endif -// lcl_log_if(, , , [, [, ...]]) +// RKlcl_log_if(, , , [, [, ...]]) // -// : a log component with prefix 'lcl_c' -// : a log level with prefix 'lcl_v' +// : a log component with prefix 'RKlcl_c' +// : a log level with prefix 'RKlcl_v' // : a predicate for conditional logging // : a format string of type NSString (may include %@) // : optional arguments required by the format string @@ -202,22 +202,22 @@ typedef uint32_t _lcl_component_t; // // The predicate is only evaluated if the given log level is active. // -// The actual logging is done by _lcl_logger which must be defined by a concrete -// logging back-end. _lcl_logger has the same signature as lcl_log. +// The actual logging is done by _RKlcl_logger which must be defined by a concrete +// logging back-end. _RKlcl_logger has the same signature as RKlcl_log. // -#ifdef _LCL_NO_LOGGING -# define lcl_log_if(_component, _level, _predicate, _format, ...) \ +#ifdef _RKLCL_NO_LOGGING +# define RKlcl_log_if(_component, _level, _predicate, _format, ...) \ do { \ } while (0) #else -# define lcl_log_if(_component, _level, _predicate, _format, ...) \ +# define RKlcl_log_if(_component, _level, _predicate, _format, ...) \ do { \ - if (((_lcl_component_level[(__lcl_log_symbol(_component))]) >= \ - (__lcl_log_symbol(_level))) \ + if (((_RKlcl_component_level[(__RKlcl_log_symbol(_component))]) >= \ + (__RKlcl_log_symbol(_level))) \ && \ (_predicate) \ ) { \ - _lcl_logger(_component, \ + _RKlcl_logger(_component, \ _level, \ _format, \ ##__VA_ARGS__); \ @@ -225,51 +225,51 @@ typedef uint32_t _lcl_component_t; } while (0) #endif -#ifndef _LCL_NO_IGNORE_WARNINGS +#ifndef _RKLCL_NO_IGNORE_WARNINGS # ifdef __clang__ # pragma clang diagnostic pop # endif #endif -// lcl_configure_by_component(, ) +// RKlcl_configure_by_component(, ) // -// : a log component with prefix 'lcl_c' -// : a log level with prefix 'lcl_v' +// : a log component with prefix 'RKlcl_c' +// : a log level with prefix 'RKlcl_v' // // Configures the given log level for the given log component. // Returns the number of configured log components, or 0 on failure. // -uint32_t lcl_configure_by_component(_lcl_component_t component, _lcl_level_t level); +uint32_t RKlcl_configure_by_component(_RKlcl_component_t component, _RKlcl_level_t level); -// lcl_configure_by_identifier(, ) +// RKlcl_configure_by_identifier(, ) // // : a log component's identifier with optional '*' wildcard suffix -// : a log level with prefix 'lcl_v' +// : a log level with prefix 'RKlcl_v' // // Configures the given log level for the given log component(s). // Returns the number of configured log components, or 0 on failure. // -uint32_t lcl_configure_by_identifier(const char *identifier, _lcl_level_t level); +uint32_t RKlcl_configure_by_identifier(const char *identifier, _RKlcl_level_t level); -// lcl_configure_by_header(
, ) +// RKlcl_configure_by_header(
, ) // //
: a log component's header with optional '*' wildcard suffix -// : a log level with prefix 'lcl_v' +// : a log level with prefix 'RKlcl_v' // // Configures the given log level for the given log component(s). // Returns the number of configured log components, or 0 on failure. // -uint32_t lcl_configure_by_header(const char *header, _lcl_level_t level); +uint32_t RKlcl_configure_by_header(const char *header, _RKlcl_level_t level); -// lcl_configure_by_name(, ) +// RKlcl_configure_by_name(, ) // // : a log component's name with optional '*' wildcard suffix -// : a log level with prefix 'lcl_v' +// : a log level with prefix 'RKlcl_v' // // Configures the given log level for the given log component(s). // Returns the number of configured log components, or 0 on failure. // -uint32_t lcl_configure_by_name(const char *name, _lcl_level_t level); +uint32_t RKlcl_configure_by_name(const char *name, _RKlcl_level_t level); // @@ -278,41 +278,41 @@ uint32_t lcl_configure_by_name(const char *name, _lcl_level_t level); // Active log levels, indexed by log component. -extern _lcl_level_narrow_t _lcl_component_level[_lcl_component_t_count]; +extern _RKlcl_level_narrow_t _RKlcl_component_level[_RKlcl_component_t_count]; // Log component identifiers, indexed by log component. -extern const char * const _lcl_component_identifier[_lcl_component_t_count]; +extern const char * const _RKlcl_component_identifier[_RKlcl_component_t_count]; // Log component headers, indexed by log component. -extern const char * const _lcl_component_header[_lcl_component_t_count]; +extern const char * const _RKlcl_component_header[_RKlcl_component_t_count]; // Log component names, indexed by log component. -extern const char * const _lcl_component_name[_lcl_component_t_count]; +extern const char * const _RKlcl_component_name[_RKlcl_component_t_count]; // Log level headers, indexed by log level. -extern const char * const _lcl_level_header[_lcl_level_t_count]; // full header -extern const char * const _lcl_level_header_1[_lcl_level_t_count]; // header with 1 character -extern const char * const _lcl_level_header_3[_lcl_level_t_count]; // header with 3 characters +extern const char * const _RKlcl_level_header[_RKlcl_level_t_count]; // full header +extern const char * const _RKlcl_level_header_1[_RKlcl_level_t_count]; // header with 1 character +extern const char * const _RKlcl_level_header_3[_RKlcl_level_t_count]; // header with 3 characters // Log level names, indexed by log level. -extern const char * const _lcl_level_name[_lcl_level_t_count]; +extern const char * const _RKlcl_level_name[_RKlcl_level_t_count]; // Version. -extern const char * const _lcl_version; +extern const char * const _RKlcl_version; -// Log level symbols used by lcl_log, prefixed with '__lcl_log_symbol_lcl_v'. +// Log level symbols used by RKlcl_log, prefixed with '__RKlcl_log_symbol_RKlcl_v'. enum { - __lcl_log_symbol_lcl_vCritical = lcl_vCritical, - __lcl_log_symbol_lcl_vError = lcl_vError, - __lcl_log_symbol_lcl_vWarning = lcl_vWarning, - __lcl_log_symbol_lcl_vInfo = lcl_vInfo, - __lcl_log_symbol_lcl_vDebug = lcl_vDebug, - __lcl_log_symbol_lcl_vTrace = lcl_vTrace + __RKlcl_log_symbol_RKlcl_vCritical = RKlcl_vCritical, + __RKlcl_log_symbol_RKlcl_vError = RKlcl_vError, + __RKlcl_log_symbol_RKlcl_vWarning = RKlcl_vWarning, + __RKlcl_log_symbol_RKlcl_vInfo = RKlcl_vInfo, + __RKlcl_log_symbol_RKlcl_vDebug = RKlcl_vDebug, + __RKlcl_log_symbol_RKlcl_vTrace = RKlcl_vTrace }; -// Macro for appending the '__lcl_log_symbol_' prefix to a given symbol. -#define __lcl_log_symbol(_symbol) \ - __lcl_log_symbol_##_symbol +// Macro for appending the '__RKlcl_log_symbol_' prefix to a given symbol. +#define __RKlcl_log_symbol(_symbol) \ + __RKlcl_log_symbol_##_symbol // End C linkage. @@ -321,35 +321,35 @@ enum { #endif -// Include logging back-end and definition of _lcl_logger. -#import "lcl_config_logger.h" +// Include logging back-end and definition of _RKlcl_logger. +#import "lcl_config_logger_RK.h" -// For simple configurations where 'lcl_config_logger.h' is empty, define a -// default NSLog()-based _lcl_logger here. -#ifndef _lcl_logger +// For simple configurations where 'lcl_config_logger_RK.h' is empty, define a +// default NSLog()-based _RKlcl_logger here. +#ifndef _RKlcl_logger // ARC/non-ARC autorelease pool -#define _lcl_logger_autoreleasepool_arc 0 +#define _RKlcl_logger_autoreleasepool_arc 0 #if defined(__has_feature) # if __has_feature(objc_arc) -# undef _lcl_logger_autoreleasepool_arc -# define _lcl_logger_autoreleasepool_arc 1 +# undef _RKlcl_logger_autoreleasepool_arc +# define _RKlcl_logger_autoreleasepool_arc 1 # endif #endif -#if _lcl_logger_autoreleasepool_arc -# define _lcl_logger_autoreleasepool_begin \ +#if _RKlcl_logger_autoreleasepool_arc +# define _RKlcl_logger_autoreleasepool_begin \ @autoreleasepool { -# define _lcl_logger_autoreleasepool_end \ +# define _RKlcl_logger_autoreleasepool_end \ } #else -# define _lcl_logger_autoreleasepool_begin \ - NSAutoreleasePool *_lcl_logger_autoreleasepool = [[NSAutoreleasePool alloc] init]; -# define _lcl_logger_autoreleasepool_end \ - [_lcl_logger_autoreleasepool release]; +# define _RKlcl_logger_autoreleasepool_begin \ + NSAutoreleasePool *_RKlcl_logger_autoreleasepool = [[NSAutoreleasePool alloc] init]; +# define _RKlcl_logger_autoreleasepool_end \ + [_RKlcl_logger_autoreleasepool release]; #endif -#ifndef _LCL_NO_IGNORE_WARNINGS +#ifndef _RKLCL_NO_IGNORE_WARNINGS # ifdef __clang__ // Ignore some warnings about variadic macros when using '-Weverything'. # pragma clang diagnostic push @@ -360,18 +360,18 @@ enum { #endif // A simple default logger, which redirects to NSLog(). -#define _lcl_logger(_component, _level, _format, ...) { \ - _lcl_logger_autoreleasepool_begin \ +#define _RKlcl_logger(_component, _level, _format, ...) { \ + _RKlcl_logger_autoreleasepool_begin \ NSLog(@"%s %s:%@:%d " _format, \ - _lcl_level_header_1[_level], \ - _lcl_component_header[_component], \ + _RKlcl_level_header_1[_level], \ + _RKlcl_component_header[_component], \ [@__FILE__ lastPathComponent], \ __LINE__, \ ## __VA_ARGS__); \ - _lcl_logger_autoreleasepool_end \ + _RKlcl_logger_autoreleasepool_end \ } -#ifndef _LCL_NO_IGNORE_WARNINGS +#ifndef _RKLCL_NO_IGNORE_WARNINGS # ifdef __clang__ # pragma clang diagnostic pop # endif @@ -381,8 +381,8 @@ enum { // Include extensions. -#import "lcl_config_extensions.h" +#import "lcl_config_extensions_RK.h" -#endif // __LCL_H__ +#endif // __RKLCL_H__ diff --git a/Vendor/LibComponentLogging/Core/lcl.m b/Vendor/LibComponentLogging/Core/lcl_RK.m similarity index 54% rename from Vendor/LibComponentLogging/Core/lcl.m rename to Vendor/LibComponentLogging/Core/lcl_RK.m index 4cadb8fe81..9c2a6b8cda 100644 --- a/Vendor/LibComponentLogging/Core/lcl.m +++ b/Vendor/LibComponentLogging/Core/lcl_RK.m @@ -1,6 +1,6 @@ // // -// lcl.m -- LibComponentLogging +// lcl_RK.m -- LibComponentLogging, embedded, RestKit/RK // // // Copyright (c) 2008-2012 Arne Harren @@ -23,39 +23,39 @@ // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN // THE SOFTWARE. -#import "lcl.h" +#import "lcl_RK.h" #include // Active log levels, indexed by log component. -_lcl_level_narrow_t _lcl_component_level[_lcl_component_t_count]; +_RKlcl_level_narrow_t _RKlcl_component_level[_RKlcl_component_t_count]; // Log component identifiers, indexed by log component. -const char * const _lcl_component_identifier[] = { -# define _lcl_component(_identifier, _header, _name) \ +const char * const _RKlcl_component_identifier[] = { +# define _RKlcl_component(_identifier, _header, _name) \ #_identifier, -# include "lcl_config_components.h" -# undef _lcl_component +# include "lcl_config_components_RK.h" +# undef _RKlcl_component }; // Log component headers, indexed by log component. -const char * const _lcl_component_header[] = { -# define _lcl_component(_identifier, _header, _name) \ +const char * const _RKlcl_component_header[] = { +# define _RKlcl_component(_identifier, _header, _name) \ _header, -# include "lcl_config_components.h" -# undef _lcl_component +# include "lcl_config_components_RK.h" +# undef _RKlcl_component }; // Log component names, indexed by log component. -const char * const _lcl_component_name[] = { -# define _lcl_component(_identifier, _header, _name) \ +const char * const _RKlcl_component_name[] = { +# define _RKlcl_component(_identifier, _header, _name) \ _name, -# include "lcl_config_components.h" -# undef _lcl_component +# include "lcl_config_components_RK.h" +# undef _RKlcl_component }; // Log level headers, indexed by log level. -const char * const _lcl_level_header[] = { +const char * const _RKlcl_level_header[] = { "-", "CRITICAL", "ERROR", @@ -64,7 +64,7 @@ "DEBUG", "TRACE" }; -const char * const _lcl_level_header_1[] = { +const char * const _RKlcl_level_header_1[] = { "-", "C", "E", @@ -73,7 +73,7 @@ "D", "T" }; -const char * const _lcl_level_header_3[] = { +const char * const _RKlcl_level_header_3[] = { "---", "CRI", "ERR", @@ -84,7 +84,7 @@ }; // Log level names, indexed by log level. -const char * const _lcl_level_name[] = { +const char * const _RKlcl_level_name[] = { "Off", "Critical", "Error", @@ -95,23 +95,23 @@ }; // Version. -#define __lcl_version_to_string( _text) __lcl_version_to_string0(_text) -#define __lcl_version_to_string0(_text) #_text -const char * const _lcl_version = __lcl_version_to_string(_LCL_VERSION_MAJOR) - "." __lcl_version_to_string(_LCL_VERSION_MINOR) - "." __lcl_version_to_string(_LCL_VERSION_BUILD) - "" _LCL_VERSION_SUFFIX; +#define __RKlcl_version_to_string( _text) __RKlcl_version_to_string0(_text) +#define __RKlcl_version_to_string0(_text) #_text +const char * const _RKlcl_version = __RKlcl_version_to_string(_RKLCL_VERSION_MAJOR) + "." __RKlcl_version_to_string(_RKLCL_VERSION_MINOR) + "." __RKlcl_version_to_string(_RKLCL_VERSION_BUILD) + "" _RKLCL_VERSION_SUFFIX; // Configures the given log level for the given log component. -uint32_t lcl_configure_by_component(_lcl_component_t component, _lcl_level_t level) { +uint32_t RKlcl_configure_by_component(_RKlcl_component_t component, _RKlcl_level_t level) { // unsupported level, clip to last level - if (level > _lcl_level_t_last) { - level = _lcl_level_t_last; + if (level > _RKlcl_level_t_last) { + level = _RKlcl_level_t_last; } // configure the component - if (component <= _lcl_component_t_last) { - _lcl_component_level[component] = level; + if (component <= _RKlcl_component_t_last) { + _RKlcl_component_level[component] = level; return 1; } @@ -119,17 +119,17 @@ uint32_t lcl_configure_by_component(_lcl_component_t component, _lcl_level_t lev } // Configures the given log level for the given log component(s). -static uint32_t _lcl_configure_by_text(uint32_t count, const char * const *texts, - _lcl_level_narrow_t *levels, const char *text, - _lcl_level_t level) { +static uint32_t _RKlcl_configure_by_text(uint32_t count, const char * const *texts, + _RKlcl_level_narrow_t *levels, const char *text, + _RKlcl_level_t level) { // no text given, quit if (text == NULL || text[0] == '\0') { return 0; } // unsupported level, clip to last level - if (level > _lcl_level_t_last) { - level = _lcl_level_t_last; + if (level > _RKlcl_level_t_last) { + level = _RKlcl_level_t_last; } // configure the components @@ -157,20 +157,20 @@ static uint32_t _lcl_configure_by_text(uint32_t count, const char * const *texts } // Configures the given log level for the given log component(s) by identifier. -uint32_t lcl_configure_by_identifier(const char *identifier, _lcl_level_t level) { - return _lcl_configure_by_text(_lcl_component_t_count, _lcl_component_identifier, - _lcl_component_level, identifier, level); +uint32_t RKlcl_configure_by_identifier(const char *identifier, _RKlcl_level_t level) { + return _RKlcl_configure_by_text(_RKlcl_component_t_count, _RKlcl_component_identifier, + _RKlcl_component_level, identifier, level); } // Configures the given log level for the given log component(s) by header. -uint32_t lcl_configure_by_header(const char *header, _lcl_level_t level) { - return _lcl_configure_by_text(_lcl_component_t_count, _lcl_component_header, - _lcl_component_level, header, level); +uint32_t RKlcl_configure_by_header(const char *header, _RKlcl_level_t level) { + return _RKlcl_configure_by_text(_RKlcl_component_t_count, _RKlcl_component_header, + _RKlcl_component_level, header, level); } // Configures the given log level for the given log component(s) by name. -uint32_t lcl_configure_by_name(const char *name, _lcl_level_t level) { - return _lcl_configure_by_text(_lcl_component_t_count, _lcl_component_name, - _lcl_component_level, name, level); +uint32_t RKlcl_configure_by_name(const char *name, _RKlcl_level_t level) { + return _RKlcl_configure_by_text(_RKlcl_component_t_count, _RKlcl_component_name, + _RKlcl_component_level, name, level); } diff --git a/Vendor/LibComponentLogging/Core/lcl_config_components.template.h b/Vendor/LibComponentLogging/Core/lcl_config_components.template.h deleted file mode 100644 index f3633407fa..0000000000 --- a/Vendor/LibComponentLogging/Core/lcl_config_components.template.h +++ /dev/null @@ -1,69 +0,0 @@ -// -// -// lcl_config_components.h -// -// -// Copyright (c) 2008-2012 Arne Harren -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -// -// lcl_config_components.h template. -// - - -// -// The lcl_config_components.h file is used to define the application's log -// components. -// -// Use the code -// -// _lcl_component(,
, ) -// -// for defining a log component, where -// -// - is the unique name of a log component which is used in calls -// to lcl_log etc. A symbol 'lcl_c' is automatically created for -// each log component. -// -// -
is a C string in UTF-8 which should be used by a logging back-end -// when writing a log message for the log component. The header is a technical -// key for identifying a log component's messages. It is recommended to use -// a 'Reverse ICANN' naming scheme when the header contains grouping -// information, e.g. 'example.main.component1'. -// -// - is a C string in UTF-8 which contains the name of the log component -// and its grouping information in a non-technical, human-readable way -// which could be used by a user interface. Groups should be separated by the -// path separator '/', e.g. 'Example/Main/Component 1'. -// - - -// -// Examples -// - -_lcl_component(Main, "main", "Main") -_lcl_component(MainComponent1, "main.component1", "Main/Component1") -_lcl_component(MainComponent2, "main.component2", "Main/Component2") - -_lcl_component(Main2, "main2", "Main2") - -_lcl_component(Main3, "main3", "Main3") - diff --git a/Vendor/LibComponentLogging/Core/lcl_config_extensions.template.h b/Vendor/LibComponentLogging/Core/lcl_config_extensions.template.h deleted file mode 100644 index 87d4694b0c..0000000000 --- a/Vendor/LibComponentLogging/Core/lcl_config_extensions.template.h +++ /dev/null @@ -1,35 +0,0 @@ -// -// -// lcl_config_extensions.h -// -// -// Copyright (c) 2008-2012 Arne Harren -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -// -// lcl_config_extensions.h template. -// - - -// -// The lcl_config_extensions.h file can be used to #include, #import, or define -// log extensions. -// - diff --git a/Vendor/LibComponentLogging/Core/lcl_config_logger.template.h b/Vendor/LibComponentLogging/Core/lcl_config_logger.template.h deleted file mode 100644 index a2ac9beece..0000000000 --- a/Vendor/LibComponentLogging/Core/lcl_config_logger.template.h +++ /dev/null @@ -1,80 +0,0 @@ -// -// -// lcl_config_logger.h -// -// -// Copyright (c) 2008-2012 Arne Harren -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall be included in -// all copies or substantial portions of the Software. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. - -// -// lcl_config_logger.h template. -// - - -// -// The lcl_config_logger.h file is used to define the logging back-end which -// is used by the lcl_log() logging macro. -// -// For integration with the logging macro, a back-end simply defines the -// _lcl_logger macro which has the following signature: -// -// #define _lcl_logger(_component, _level, _format, ...) -// - - -// -// Example -// - - -// ARC/non-ARC autorelease pool -#define _lcl_logger_autoreleasepool_arc 0 -#if defined(__has_feature) -# if __has_feature(objc_arc) -# undef _lcl_logger_autoreleasepool_arc -# define _lcl_logger_autoreleasepool_arc 1 -# endif -#endif -#if _lcl_logger_autoreleasepool_arc -# define _lcl_logger_autoreleasepool_begin \ - @autoreleasepool { -# define _lcl_logger_autoreleasepool_end \ - } -#else -# define _lcl_logger_autoreleasepool_begin \ - NSAutoreleasePool *_lcl_logger_autoreleasepool = [[NSAutoreleasePool alloc] init]; -# define _lcl_logger_autoreleasepool_end \ - [_lcl_logger_autoreleasepool release]; -#endif - - -// A very simple logger, which redirects to NSLog(). -#define _lcl_logger(_component, _level, _format, ...) { \ - _lcl_logger_autoreleasepool_begin \ - NSLog(@"%s %s:%@:%d:%s " _format, \ - _lcl_level_header_1[_level], \ - _lcl_component_header[_component], \ - [@__FILE__ lastPathComponent], \ - __LINE__, \ - __PRETTY_FUNCTION__, \ - ## __VA_ARGS__); \ - _lcl_logger_autoreleasepool_end \ -} - diff --git a/Vendor/LibComponentLogging/NSLog/LCLNSLog.h b/Vendor/LibComponentLogging/NSLog/LCLNSLog_RK.h similarity index 64% rename from Vendor/LibComponentLogging/NSLog/LCLNSLog.h rename to Vendor/LibComponentLogging/NSLog/LCLNSLog_RK.h index 20631822b1..06f9bda20d 100644 --- a/Vendor/LibComponentLogging/NSLog/LCLNSLog.h +++ b/Vendor/LibComponentLogging/NSLog/LCLNSLog_RK.h @@ -1,6 +1,6 @@ // // -// LCLNSLog.h +// LCLNSLog_RK.h // // // Copyright (c) 2008-2011 Arne Harren @@ -25,7 +25,7 @@ // -// LCLNSLog +// RKLCLNSLog // // This file provides a simple LibComponentLogging logger implementation which // redirects logging to NSLog. @@ -52,49 +52,49 @@ // ARC/non-ARC autorelease pool -#define _lcl_logger_autoreleasepool_arc 0 +#define _RKlcl_logger_autoreleasepool_arc 0 #if defined(__has_feature) # if __has_feature(objc_arc) -# undef _lcl_logger_autoreleasepool_arc -# define _lcl_logger_autoreleasepool_arc 1 +# undef _RKlcl_logger_autoreleasepool_arc +# define _RKlcl_logger_autoreleasepool_arc 1 # endif #endif -#if _lcl_logger_autoreleasepool_arc -#define _lcl_logger_autoreleasepool_begin \ +#if _RKlcl_logger_autoreleasepool_arc +#define _RKlcl_logger_autoreleasepool_begin \ @autoreleasepool { -#define _lcl_logger_autoreleasepool_end \ +#define _RKlcl_logger_autoreleasepool_end \ } #else -#define _lcl_logger_autoreleasepool_begin \ - NSAutoreleasePool *_lcl_logger_autoreleasepool = [[NSAutoreleasePool alloc] init]; -#define _lcl_logger_autoreleasepool_end \ - [_lcl_logger_autoreleasepool release]; +#define _RKlcl_logger_autoreleasepool_begin \ + NSAutoreleasePool *_RKlcl_logger_autoreleasepool = [[NSAutoreleasePool alloc] init]; +#define _RKlcl_logger_autoreleasepool_end \ + [_RKlcl_logger_autoreleasepool release]; #endif // A very simple logger, which redirects to NSLog(). #if 0 -#define _lcl_logger(_component, _level, _format, ...) { \ - _lcl_logger_autoreleasepool_begin \ +#define _RKlcl_logger(_component, _level, _format, ...) { \ + _RKlcl_logger_autoreleasepool_begin \ NSLog(@"%s %s:%@:%d:%s " _format, \ - _lcl_level_header_1[_level], \ - _lcl_component_header[_component], \ + _RKlcl_level_header_1[_level], \ + _RKlcl_component_header[_component], \ [@__FILE__ lastPathComponent], \ __LINE__, \ __PRETTY_FUNCTION__, \ ## __VA_ARGS__); \ - _lcl_logger_autoreleasepool_end \ + _RKlcl_logger_autoreleasepool_end \ } #else -#define _lcl_logger(_component, _level, _format, ...) { \ - _lcl_logger_autoreleasepool_begin \ +#define _RKlcl_logger(_component, _level, _format, ...) { \ + _RKlcl_logger_autoreleasepool_begin \ NSLog(@"%s %s:%@:%d " _format, \ - _lcl_level_header_1[_level], \ - _lcl_component_header[_component], \ + _RKlcl_level_header_1[_level], \ + _RKlcl_component_header[_component], \ [@__FILE__ lastPathComponent], \ __LINE__, \ ## __VA_ARGS__); \ - _lcl_logger_autoreleasepool_end \ + _RKlcl_logger_autoreleasepool_end \ } #endif diff --git a/Vendor/LibComponentLogging/NSLog/LCLNSLog.m b/Vendor/LibComponentLogging/NSLog/LCLNSLog_RK.m similarity index 98% rename from Vendor/LibComponentLogging/NSLog/LCLNSLog.m rename to Vendor/LibComponentLogging/NSLog/LCLNSLog_RK.m index 3e20cf0123..eb19782436 100644 --- a/Vendor/LibComponentLogging/NSLog/LCLNSLog.m +++ b/Vendor/LibComponentLogging/NSLog/LCLNSLog_RK.m @@ -1,6 +1,6 @@ // // -// LCLNSLog.m +// LCLNSLog_RK.m // // // Copyright (c) 2008-2009 Arne Harren diff --git a/Vendor/iso8601parser/ISO8601DateFormatter.m b/Vendor/iso8601parser/ISO8601DateFormatter.m index cc5fd4d47b..d4ab936554 100644 --- a/Vendor/iso8601parser/ISO8601DateFormatter.m +++ b/Vendor/iso8601parser/ISO8601DateFormatter.m @@ -10,7 +10,7 @@ // Set Logging Component #undef RKLogComponent -#define RKLogComponent lcl_cRestKitSupport +#define RKLogComponent RKlcl_cRestKitSupport #ifndef DEFAULT_TIME_SEPARATOR # define DEFAULT_TIME_SEPARATOR ':'