mirror of
https://github.com/zhigang1992/RestKit.git
synced 2026-06-18 07:29:15 +08:00
Merge pull request #950 from aharren/feature/reboot-networking-layer
Use embedded variant of LibComponentLogging with prefix RK
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
|
||||
// Set Logging Component
|
||||
#undef RKLogComponent
|
||||
#define RKLogComponent lcl_cRestKitCoreDataCache
|
||||
#define RKLogComponent RKlcl_cRestKitCoreDataCache
|
||||
|
||||
@interface RKEntityByAttributeCache ()
|
||||
@property (nonatomic, strong) NSMutableDictionary *attributeValuesToObjectIDs;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
// Set Logging Component
|
||||
#undef RKLogComponent
|
||||
#define RKLogComponent lcl_cRestKitCoreData
|
||||
#define RKLogComponent RKlcl_cRestKitCoreData
|
||||
|
||||
@implementation RKFetchRequestManagedObjectCache
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
// Set Logging Component
|
||||
#undef RKLogComponent
|
||||
#define RKLogComponent lcl_cRestKitCoreData
|
||||
#define RKLogComponent RKlcl_cRestKitCoreData
|
||||
|
||||
//static NSString * const RKInMemoryObjectManagedObjectCacheThreadDictionaryKey = @"RKInMemoryObjectManagedObjectCacheThreadDictionaryKey";
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
// Set Logging Component
|
||||
#undef RKLogComponent
|
||||
#define RKLogComponent lcl_cRestKitCoreData
|
||||
#define RKLogComponent RKlcl_cRestKitCoreData
|
||||
|
||||
@interface RKManagedObjectThreadSafeInvocation ()
|
||||
@property (nonatomic, strong) NSMutableDictionary *argumentKeyPaths;
|
||||
|
||||
@@ -29,7 +29,7 @@ RK_FIX_CATEGORY_BUG(RKPropertyInspector_CoreData)
|
||||
|
||||
// Set Logging Component
|
||||
#undef RKLogComponent
|
||||
#define RKLogComponent lcl_cRestKitCoreData
|
||||
#define RKLogComponent RKlcl_cRestKitCoreData
|
||||
|
||||
@implementation RKPropertyInspector (CoreData)
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 @@
|
||||
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 @@
|
||||
{
|
||||
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]);
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
// Set Logging Component
|
||||
#undef RKLogComponent
|
||||
#define RKLogComponent lcl_cRestKitCoreData
|
||||
#define RKLogComponent RKlcl_cRestKitCoreData
|
||||
|
||||
@interface RKManagedObjectRequestOperation () <RKMapperOperationDelegate>
|
||||
// Core Data specific
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
// Set Logging Component
|
||||
#undef RKLogComponent
|
||||
#define RKLogComponent lcl_cRestKitNetwork
|
||||
#define RKLogComponent RKlcl_cRestKitNetwork
|
||||
|
||||
@interface RKObjectParameterization () <RKMappingOperationDelegate>
|
||||
@property (nonatomic, strong) id object;
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
// Set Logging Component
|
||||
#undef RKLogComponent
|
||||
#define RKLogComponent lcl_cRestKitNetwork
|
||||
#define RKLogComponent RKlcl_cRestKitNetwork
|
||||
|
||||
static inline NSString *RKDescriptionForRequest(NSURLRequest *request)
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
// Set Logging Component
|
||||
#undef RKLogComponent
|
||||
#define RKLogComponent lcl_cRestKitObjectMapping
|
||||
#define RKLogComponent RKlcl_cRestKitObjectMapping
|
||||
|
||||
@interface RKDynamicMapping ()
|
||||
@property (nonatomic, strong) NSMutableArray *matchers;
|
||||
|
||||
@@ -30,7 +30,7 @@ NSString * const RKMappingErrorKeyPathErrorKey = @"keyPath";
|
||||
|
||||
// Set Logging Component
|
||||
#undef RKLogComponent
|
||||
#define RKLogComponent lcl_cRestKitObjectMapping
|
||||
#define RKLogComponent RKlcl_cRestKitObjectMapping
|
||||
|
||||
static NSString *RKDelegateKeyPathFromKeyPath(NSString *keyPath)
|
||||
{
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
// Set Logging Component
|
||||
#undef RKLogComponent
|
||||
#define RKLogComponent lcl_cRestKitObjectMapping
|
||||
#define RKLogComponent RKlcl_cRestKitObjectMapping
|
||||
|
||||
@implementation RKPropertyInspector
|
||||
|
||||
|
||||
@@ -31,4 +31,4 @@
|
||||
to use RKLog() in their own app.
|
||||
*/
|
||||
#undef RKLogComponent
|
||||
#define RKLogComponent lcl_cApp
|
||||
#define RKLogComponent RKlcl_cApp
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
// Set Logging Component
|
||||
#undef RKLogComponent
|
||||
#define RKLogComponent lcl_cRestKitSearch
|
||||
#define RKLogComponent RKlcl_cRestKitSearch
|
||||
|
||||
NSString * const RKSearchableAttributeNamesUserInfoKey = @"RestKitSearchableAttributes";
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
// Set Logging Component
|
||||
#undef RKLogComponent
|
||||
#define RKLogComponent lcl_cRestKitCoreData
|
||||
#define RKLogComponent RKlcl_cRestKitCoreData
|
||||
|
||||
@implementation RKSearchWord
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -19,7 +19,6 @@
|
||||
//
|
||||
|
||||
#import "RKLog.h"
|
||||
#import "lcl.h"
|
||||
|
||||
int RKLogLevelForString(NSString *, NSString *);
|
||||
|
||||
@@ -28,8 +27,8 @@ static BOOL loggingInitialized = NO;
|
||||
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;
|
||||
}
|
||||
@@ -153,7 +152,7 @@ void RKLogIntegerAsBinary(NSUInteger bitMask)
|
||||
|
||||
void RKLogCoreDataError(NSError *error)
|
||||
{
|
||||
RKLogToComponentWithLevelWhileExecutingBlock(lcl_cRestKitCoreData, RKLogLevelError, ^{
|
||||
RKLogToComponentWithLevelWhileExecutingBlock(RKlcl_cRestKitCoreData, RKLogLevelError, ^{
|
||||
RKLogValidationError(error);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
|
||||
// Define logging component
|
||||
#undef RKLogComponent
|
||||
#define RKLogComponent lcl_cRestKitSupport
|
||||
#define RKLogComponent RKlcl_cRestKitSupport
|
||||
|
||||
@interface RKMIMETypeSerializationRegistration : NSObject
|
||||
|
||||
|
||||
@@ -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(<identifier>, <header>, <name>)
|
||||
//
|
||||
// for defining a log component, where
|
||||
//
|
||||
// - <identifier> is the unique name of a log component which is used in calls
|
||||
// to lcl_log etc. A symbol 'lcl_c<identifier>' is automatically created for
|
||||
// each log component.
|
||||
//
|
||||
// - <header> 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'.
|
||||
//
|
||||
// - <name> 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")
|
||||
66
Code/Support/lcl_config_components_RK.h
Normal file
66
Code/Support/lcl_config_components_RK.h
Normal file
@@ -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(<identifier>, <header>, <name>)
|
||||
//
|
||||
// for defining a log component, where
|
||||
//
|
||||
// - <identifier> is the unique name of a log component which is used in calls
|
||||
// to RKlcl_log etc. A symbol 'RKlcl_c<identifier>' is automatically created for
|
||||
// each log component.
|
||||
//
|
||||
// - <header> 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'.
|
||||
//
|
||||
// - <name> 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")
|
||||
@@ -1,5 +1,5 @@
|
||||
//
|
||||
// lcl_config_extensions.h
|
||||
// lcl_config_extensions_RK.h
|
||||
// RestKit
|
||||
//
|
||||
// Created by Blake Watters on 6/8/11.
|
||||
@@ -18,4 +18,3 @@
|
||||
// limitations under the License.
|
||||
//
|
||||
|
||||
#import "RKLog.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"
|
||||
@@ -82,8 +82,8 @@ static RKTestFactory *sharedFactory = nil;
|
||||
[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 @@ static RKTestFactory *sharedFactory = nil;
|
||||
[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];
|
||||
});
|
||||
});
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
// Set Logging Component
|
||||
#undef RKLogComponent
|
||||
#define RKLogComponent lcl_cRestKitTesting
|
||||
#define RKLogComponent RKlcl_cRestKitTesting
|
||||
|
||||
NSString * const RKTestResponseLoaderTimeoutException = @"RKTestResponseLoaderTimeoutException";
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ Pod::Spec.new do |s|
|
||||
### Subspecs
|
||||
|
||||
s.subspec 'Core' do |cs|
|
||||
cs.source_files = 'Code/*.h'
|
||||
cs.source_files = 'Code/*.h', 'Vendor/LibComponentLogging/Core', 'Vendor/LibComponentLogging/NSLog'
|
||||
cs.header_dir = 'RestKit'
|
||||
|
||||
cs.dependency 'RestKit/ObjectMapping'
|
||||
@@ -37,7 +37,6 @@ Pod::Spec.new do |s|
|
||||
ns.source_files = 'Code/Network'
|
||||
ns.ios.frameworks = 'CFNetwork', 'Security', 'MobileCoreServices', 'SystemConfiguration'
|
||||
ns.osx.frameworks = 'CoreServices', 'Security', 'SystemConfiguration'
|
||||
ns.dependency 'LibComponentLogging-NSLog', '>= 1.0.4'
|
||||
ns.dependency 'SOCKit'
|
||||
ns.dependency 'AFNetworking', :head # '1.0'
|
||||
ns.dependency 'RestKit/ObjectMapping'
|
||||
|
||||
@@ -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 = "<group>"; };
|
||||
25160D99145650490060A5C5 /* RKRelationshipMapping.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RKRelationshipMapping.m; sourceTree = "<group>"; };
|
||||
25160DA1145650490060A5C5 /* RestKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RestKit.h; sourceTree = "<group>"; };
|
||||
25160DA5145650490060A5C5 /* lcl_config_components.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lcl_config_components.h; sourceTree = "<group>"; };
|
||||
25160DA6145650490060A5C5 /* lcl_config_extensions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lcl_config_extensions.h; sourceTree = "<group>"; };
|
||||
25160DA7145650490060A5C5 /* lcl_config_logger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lcl_config_logger.h; sourceTree = "<group>"; };
|
||||
25160DA5145650490060A5C5 /* lcl_config_components_RK.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lcl_config_components_RK.h; sourceTree = "<group>"; };
|
||||
25160DA6145650490060A5C5 /* lcl_config_extensions_RK.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lcl_config_extensions_RK.h; sourceTree = "<group>"; };
|
||||
25160DA7145650490060A5C5 /* lcl_config_logger_RK.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lcl_config_logger_RK.h; sourceTree = "<group>"; };
|
||||
25160DBB145650490060A5C5 /* RestKit-Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "RestKit-Prefix.pch"; sourceTree = "<group>"; };
|
||||
25160DBE145650490060A5C5 /* RKDotNetDateFormatter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RKDotNetDateFormatter.h; sourceTree = "<group>"; };
|
||||
25160DBF145650490060A5C5 /* RKDotNetDateFormatter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RKDotNetDateFormatter.m; sourceTree = "<group>"; };
|
||||
@@ -724,15 +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 = "<group>"; };
|
||||
25160EA31456532C0060A5C5 /* lcl.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = lcl.m; sourceTree = "<group>"; };
|
||||
25160EA41456532C0060A5C5 /* lcl_config_components.template.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lcl_config_components.template.h; sourceTree = "<group>"; };
|
||||
25160EA51456532C0060A5C5 /* lcl_config_extensions.template.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lcl_config_extensions.template.h; sourceTree = "<group>"; };
|
||||
25160EA61456532C0060A5C5 /* lcl_config_logger.template.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lcl_config_logger.template.h; sourceTree = "<group>"; };
|
||||
25160EA21456532C0060A5C5 /* lcl_RK.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lcl_RK.h; sourceTree = "<group>"; };
|
||||
25160EA31456532C0060A5C5 /* lcl_RK.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = lcl_RK.m; sourceTree = "<group>"; };
|
||||
25160EA71456532C0060A5C5 /* README.md */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = README.md; sourceTree = "<group>"; };
|
||||
25160EAF1456532C0060A5C5 /* lcl_config_logger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = lcl_config_logger.h; sourceTree = "<group>"; };
|
||||
25160EB01456532C0060A5C5 /* LCLNSLog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LCLNSLog.h; sourceTree = "<group>"; };
|
||||
25160EB11456532C0060A5C5 /* LCLNSLog.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LCLNSLog.m; sourceTree = "<group>"; };
|
||||
25160EB01456532C0060A5C5 /* LCLNSLog_RK.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LCLNSLog_RK.h; sourceTree = "<group>"; };
|
||||
25160EB11456532C0060A5C5 /* LCLNSLog_RK.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LCLNSLog_RK.m; sourceTree = "<group>"; };
|
||||
25160EBD1456532C0060A5C5 /* SOCKit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SOCKit.h; sourceTree = "<group>"; };
|
||||
25160EBE1456532C0060A5C5 /* SOCKit.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SOCKit.m; sourceTree = "<group>"; };
|
||||
25160F161456538B0060A5C5 /* libxml2.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libxml2.dylib; path = usr/lib/libxml2.dylib; sourceTree = SDKROOT; };
|
||||
@@ -1280,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 */,
|
||||
@@ -1337,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;
|
||||
@@ -1350,9 +1337,8 @@
|
||||
25160EAE1456532C0060A5C5 /* NSLog */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
25160EAF1456532C0060A5C5 /* lcl_config_logger.h */,
|
||||
25160EB01456532C0060A5C5 /* LCLNSLog.h */,
|
||||
25160EB11456532C0060A5C5 /* LCLNSLog.m */,
|
||||
25160EB01456532C0060A5C5 /* LCLNSLog_RK.h */,
|
||||
25160EB11456532C0060A5C5 /* LCLNSLog_RK.m */,
|
||||
);
|
||||
path = NSLog;
|
||||
sourceTree = "<group>";
|
||||
@@ -1888,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 */,
|
||||
@@ -1977,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 */,
|
||||
@@ -1999,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 */,
|
||||
@@ -2390,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 */,
|
||||
@@ -2531,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 */,
|
||||
|
||||
@@ -449,7 +449,7 @@
|
||||
[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];
|
||||
|
||||
2
Vendor/LibComponentLogging/Core/README.md
vendored
2
Vendor/LibComponentLogging/Core/README.md
vendored
@@ -99,7 +99,7 @@ The following Git repositories are related to this repository:
|
||||
|
||||
## Copyright and License
|
||||
|
||||
Copyright (c) 2008-2011 Arne Harren <ah@0xc0.de>
|
||||
Copyright (c) 2008-2012 Arne Harren <ah@0xc0.de>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
||||
279
Vendor/LibComponentLogging/Core/lcl.h
vendored
279
Vendor/LibComponentLogging/Core/lcl.h
vendored
@@ -1,279 +0,0 @@
|
||||
//
|
||||
//
|
||||
// lcl.h -- LibComponentLogging
|
||||
//
|
||||
//
|
||||
// Copyright (c) 2008-2011 Arne Harren <ah@0xc0.de>
|
||||
//
|
||||
// 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.
|
||||
|
||||
#ifndef __LCL_H__
|
||||
#define __LCL_H__
|
||||
|
||||
#define _LCL_VERSION_MAJOR 1
|
||||
#define _LCL_VERSION_MINOR 1
|
||||
#define _LCL_VERSION_BUILD 6
|
||||
#define _LCL_VERSION_SUFFIX ""
|
||||
|
||||
//
|
||||
// lcl -- LibComponentLogging
|
||||
//
|
||||
// LibComponentLogging is a logging library for Objective-C applications
|
||||
// with the following characteristics:
|
||||
//
|
||||
// - Log levels
|
||||
// The library provides log levels for distinguishing between error messages,
|
||||
// informational messages, and fine-grained trace messages for debugging.
|
||||
//
|
||||
// - Log components
|
||||
// The library provides log components for identifying different parts of an
|
||||
// application. A log component contains a unique identifier, a short name
|
||||
// which is used as a header in a log message, and a full name which can be
|
||||
// used in a user interface.
|
||||
//
|
||||
// - Active log level per log component
|
||||
// At runtime, the library provides an active log level for each log
|
||||
// component in order to enable/disable logging for certain parts of an
|
||||
// application.
|
||||
//
|
||||
// - Grouping of log components
|
||||
// Log components which have the same name prefix form a group of log
|
||||
// components and logging can be enabled/disabled for the whole group with
|
||||
// a single command.
|
||||
//
|
||||
// - Low runtime-overhead when logging is disabled
|
||||
// Logging is based on a log macro which checks the active log level before
|
||||
// constructing the log message and before evaluating log message arguments.
|
||||
//
|
||||
// - Code completion support
|
||||
// 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
|
||||
// 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_'.
|
||||
//
|
||||
// - Meta data
|
||||
// The library provides public data structures which contain information about
|
||||
// log levels and log components, e.g. headers and names.
|
||||
//
|
||||
// - Pluggable loggers
|
||||
// The library does not contain a concrete logger, but provides a simple
|
||||
// delegation mechanism for plugging-in a concrete logger based on the
|
||||
// application's requirements, e.g. a logger which writes to the system log,
|
||||
// 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
|
||||
// will be defined to an empty effect.
|
||||
//
|
||||
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
|
||||
// Use C linkage.
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
//
|
||||
// Log levels.
|
||||
//
|
||||
|
||||
|
||||
// Log levels, prefixed with 'lcl_v'.
|
||||
enum {
|
||||
lcl_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
|
||||
|
||||
_lcl_level_t_count,
|
||||
_lcl_level_t_first = 0,
|
||||
_lcl_level_t_last = _lcl_level_t_count-1
|
||||
};
|
||||
|
||||
// Log level type.
|
||||
typedef uint32_t _lcl_level_t;
|
||||
typedef uint8_t _lcl_level_narrow_t;
|
||||
|
||||
|
||||
//
|
||||
// Log components.
|
||||
//
|
||||
|
||||
|
||||
// Log components, prefixed with 'lcl_c'.
|
||||
enum {
|
||||
# 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
|
||||
|
||||
_lcl_component_t_count,
|
||||
_lcl_component_t_first = 0,
|
||||
_lcl_component_t_last = _lcl_component_t_count-1
|
||||
};
|
||||
|
||||
// Log component type.
|
||||
typedef uint32_t _lcl_component_t;
|
||||
|
||||
|
||||
//
|
||||
// Functions and macros.
|
||||
//
|
||||
|
||||
|
||||
// lcl_log(<component>, <level>, <format>[, <arg1>[, <arg2>[, ...]]])
|
||||
//
|
||||
// <component>: a log component with prefix 'lcl_c'
|
||||
// <level> : a log level with prefix 'lcl_v'
|
||||
// <format> : a format string of type NSString (may include %@)
|
||||
// <arg..> : 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.
|
||||
//
|
||||
#ifdef _LCL_NO_LOGGING
|
||||
# define lcl_log(_component, _level, _format, ...) \
|
||||
do { \
|
||||
} while (false)
|
||||
#else
|
||||
# define lcl_log(_component, _level, _format, ...) \
|
||||
do { \
|
||||
if ((_lcl_component_level[(__lcl_log_symbol(_component))]) >= \
|
||||
(__lcl_log_symbol(_level))) { \
|
||||
_lcl_logger(_component, \
|
||||
_level, \
|
||||
_format, \
|
||||
##__VA_ARGS__); \
|
||||
} \
|
||||
} while (false)
|
||||
#endif
|
||||
|
||||
// lcl_configure_by_component(<component>, <level>)
|
||||
//
|
||||
// <component>: a log component with prefix 'lcl_c'
|
||||
// <level> : a log level with prefix 'lcl_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);
|
||||
|
||||
// lcl_configure_by_identifier(<identifier>, <level>)
|
||||
//
|
||||
// <identifier>: a log component's identifier with optional '*' wildcard suffix
|
||||
// <level> : a log level with prefix 'lcl_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);
|
||||
|
||||
// lcl_configure_by_header(<header>, <level>)
|
||||
//
|
||||
// <header> : a log component's header with optional '*' wildcard suffix
|
||||
// <level> : a log level with prefix 'lcl_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);
|
||||
|
||||
// lcl_configure_by_name(<name>, <level>)
|
||||
//
|
||||
// <name> : a log component's name with optional '*' wildcard suffix
|
||||
// <level> : a log level with prefix 'lcl_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);
|
||||
|
||||
|
||||
//
|
||||
// Internals.
|
||||
//
|
||||
|
||||
|
||||
// Active log levels, indexed by log component.
|
||||
extern _lcl_level_narrow_t _lcl_component_level[_lcl_component_t_count];
|
||||
|
||||
// Log component identifiers, indexed by log component.
|
||||
extern const char * const _lcl_component_identifier[_lcl_component_t_count];
|
||||
|
||||
// Log component headers, indexed by log component.
|
||||
extern const char * const _lcl_component_header[_lcl_component_t_count];
|
||||
|
||||
// Log component names, indexed by log component.
|
||||
extern const char * const _lcl_component_name[_lcl_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
|
||||
|
||||
// Log level names, indexed by log level.
|
||||
extern const char * const _lcl_level_name[_lcl_level_t_count];
|
||||
|
||||
// Version.
|
||||
extern const char * const _lcl_version;
|
||||
|
||||
// Log level symbols used by lcl_log, prefixed with '__lcl_log_symbol_lcl_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
|
||||
};
|
||||
|
||||
// Macro for appending the '__lcl_log_symbol_' prefix to a given symbol.
|
||||
#define __lcl_log_symbol(_symbol) \
|
||||
__lcl_log_symbol_##_symbol
|
||||
|
||||
|
||||
// End C linkage.
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
// Include logging back-end and definition of _lcl_logger.
|
||||
#import "lcl_config_logger.h"
|
||||
|
||||
// Include extensions.
|
||||
#import "lcl_config_extensions.h"
|
||||
|
||||
|
||||
#endif // __LCL_H__
|
||||
|
||||
388
Vendor/LibComponentLogging/Core/lcl_RK.h
vendored
Normal file
388
Vendor/LibComponentLogging/Core/lcl_RK.h
vendored
Normal file
@@ -0,0 +1,388 @@
|
||||
//
|
||||
//
|
||||
// lcl_RK.h -- LibComponentLogging, embedded, RestKit/RK
|
||||
//
|
||||
//
|
||||
// Copyright (c) 2008-2012 Arne Harren <ah@0xc0.de>
|
||||
//
|
||||
// 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.
|
||||
|
||||
#ifndef __RKLCL_H__
|
||||
#define __RKLCL_H__
|
||||
|
||||
#define _RKLCL_VERSION_MAJOR 1
|
||||
#define _RKLCL_VERSION_MINOR 3
|
||||
#define _RKLCL_VERSION_BUILD 1
|
||||
#define _RKLCL_VERSION_SUFFIX ""
|
||||
|
||||
//
|
||||
// lcl -- LibComponentLogging, embedded, RestKit/RK
|
||||
//
|
||||
// LibComponentLogging is a logging library for Objective-C applications
|
||||
// with the following characteristics:
|
||||
//
|
||||
// - Log levels
|
||||
// The library provides log levels for distinguishing between error messages,
|
||||
// informational messages, and fine-grained trace messages for debugging.
|
||||
//
|
||||
// - Log components
|
||||
// The library provides log components for identifying different parts of an
|
||||
// application. A log component contains a unique identifier, a short name
|
||||
// which is used as a header in a log message, and a full name which can be
|
||||
// used in a user interface.
|
||||
//
|
||||
// - Active log level per log component
|
||||
// At runtime, the library provides an active log level for each log
|
||||
// component in order to enable/disable logging for certain parts of an
|
||||
// application.
|
||||
//
|
||||
// - Grouping of log components
|
||||
// Log components which have the same name prefix form a group of log
|
||||
// components and logging can be enabled/disabled for the whole group with
|
||||
// a single command.
|
||||
//
|
||||
// - Low runtime-overhead when logging is disabled
|
||||
// Logging is based on a log macro which checks the active log level before
|
||||
// constructing the log message and before evaluating log message arguments.
|
||||
//
|
||||
// - Code completion support
|
||||
// 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 '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 '_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
|
||||
// log levels and log components, e.g. headers and names.
|
||||
//
|
||||
// - Pluggable loggers
|
||||
// The library does not contain a concrete logger, but provides a simple
|
||||
// delegation mechanism for plugging-in a concrete logger based on the
|
||||
// application's requirements, e.g. a logger which writes to the system log,
|
||||
// or a logger which writes to a log file. The concrete logger is configured
|
||||
// at build-time.
|
||||
//
|
||||
// Note: If the preprocessor symbol _RKLCL_NO_LOGGING is defined, the log macro
|
||||
// will be defined to an empty effect.
|
||||
//
|
||||
|
||||
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
|
||||
// Use C linkage.
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
//
|
||||
// Log levels.
|
||||
//
|
||||
|
||||
|
||||
// Log levels, prefixed with 'RKlcl_v'.
|
||||
enum _RKlcl_enum_level_t {
|
||||
RKlcl_vOff = 0,
|
||||
|
||||
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
|
||||
|
||||
_RKlcl_level_t_count,
|
||||
_RKlcl_level_t_first = 0,
|
||||
_RKlcl_level_t_last = _RKlcl_level_t_count-1
|
||||
};
|
||||
|
||||
// Log level type.
|
||||
typedef uint32_t _RKlcl_level_t;
|
||||
typedef uint8_t _RKlcl_level_narrow_t;
|
||||
|
||||
|
||||
//
|
||||
// Log components.
|
||||
//
|
||||
|
||||
|
||||
// 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
|
||||
|
||||
_RKlcl_component_t_count,
|
||||
_RKlcl_component_t_first = 0,
|
||||
_RKlcl_component_t_last = _RKlcl_component_t_count-1
|
||||
};
|
||||
|
||||
// Log component type.
|
||||
typedef uint32_t _RKlcl_component_t;
|
||||
|
||||
|
||||
//
|
||||
// Functions and macros.
|
||||
//
|
||||
|
||||
#ifndef _RKLCL_NO_IGNORE_WARNINGS
|
||||
# ifdef __clang__
|
||||
// Ignore some warnings about variadic macros when using '-Weverything'.
|
||||
# pragma clang diagnostic push
|
||||
# pragma clang diagnostic ignored "-Wunknown-pragmas"
|
||||
# pragma clang diagnostic ignored "-Wvariadic-macros"
|
||||
# pragma clang diagnostic ignored "-Wpedantic"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
// RKlcl_log(<component>, <level>, <format>[, <arg1>[, <arg2>[, ...]]])
|
||||
//
|
||||
// <component>: a log component with prefix 'RKlcl_c'
|
||||
// <level> : a log level with prefix 'RKlcl_v'
|
||||
// <format> : a format string of type NSString (may include %@)
|
||||
// <arg..> : 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 _RKlcl_logger which must be defined by a concrete
|
||||
// logging back-end. _RKlcl_logger has the same signature as RKlcl_log.
|
||||
//
|
||||
#ifdef _RKLCL_NO_LOGGING
|
||||
# define RKlcl_log(_component, _level, _format, ...) \
|
||||
do { \
|
||||
} while (0)
|
||||
#else
|
||||
# define RKlcl_log(_component, _level, _format, ...) \
|
||||
do { \
|
||||
if (((_RKlcl_component_level[(__RKlcl_log_symbol(_component))]) >= \
|
||||
(__RKlcl_log_symbol(_level))) \
|
||||
) { \
|
||||
_RKlcl_logger(_component, \
|
||||
_level, \
|
||||
_format, \
|
||||
##__VA_ARGS__); \
|
||||
} \
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
// RKlcl_log_if(<component>, <level>, <predicate>, <format>[, <arg1>[, ...]])
|
||||
//
|
||||
// <component>: a log component with prefix 'RKlcl_c'
|
||||
// <level> : a log level with prefix 'RKlcl_v'
|
||||
// <predicate>: a predicate for conditional logging
|
||||
// <format> : a format string of type NSString (may include %@)
|
||||
// <arg..> : 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 and if the predicate evaluates
|
||||
// to true.
|
||||
//
|
||||
// The predicate is only evaluated if the given log level is active.
|
||||
//
|
||||
// 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 _RKLCL_NO_LOGGING
|
||||
# define RKlcl_log_if(_component, _level, _predicate, _format, ...) \
|
||||
do { \
|
||||
} while (0)
|
||||
#else
|
||||
# define RKlcl_log_if(_component, _level, _predicate, _format, ...) \
|
||||
do { \
|
||||
if (((_RKlcl_component_level[(__RKlcl_log_symbol(_component))]) >= \
|
||||
(__RKlcl_log_symbol(_level))) \
|
||||
&& \
|
||||
(_predicate) \
|
||||
) { \
|
||||
_RKlcl_logger(_component, \
|
||||
_level, \
|
||||
_format, \
|
||||
##__VA_ARGS__); \
|
||||
} \
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
#ifndef _RKLCL_NO_IGNORE_WARNINGS
|
||||
# ifdef __clang__
|
||||
# pragma clang diagnostic pop
|
||||
# endif
|
||||
#endif
|
||||
|
||||
// RKlcl_configure_by_component(<component>, <level>)
|
||||
//
|
||||
// <component>: a log component with prefix 'RKlcl_c'
|
||||
// <level> : 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 RKlcl_configure_by_component(_RKlcl_component_t component, _RKlcl_level_t level);
|
||||
|
||||
// RKlcl_configure_by_identifier(<identifier>, <level>)
|
||||
//
|
||||
// <identifier>: a log component's identifier with optional '*' wildcard suffix
|
||||
// <level> : 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 RKlcl_configure_by_identifier(const char *identifier, _RKlcl_level_t level);
|
||||
|
||||
// RKlcl_configure_by_header(<header>, <level>)
|
||||
//
|
||||
// <header> : a log component's header with optional '*' wildcard suffix
|
||||
// <level> : 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 RKlcl_configure_by_header(const char *header, _RKlcl_level_t level);
|
||||
|
||||
// RKlcl_configure_by_name(<name>, <level>)
|
||||
//
|
||||
// <name> : a log component's name with optional '*' wildcard suffix
|
||||
// <level> : 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 RKlcl_configure_by_name(const char *name, _RKlcl_level_t level);
|
||||
|
||||
|
||||
//
|
||||
// Internals.
|
||||
//
|
||||
|
||||
|
||||
// Active log levels, indexed by log component.
|
||||
extern _RKlcl_level_narrow_t _RKlcl_component_level[_RKlcl_component_t_count];
|
||||
|
||||
// Log component identifiers, indexed by log component.
|
||||
extern const char * const _RKlcl_component_identifier[_RKlcl_component_t_count];
|
||||
|
||||
// Log component headers, indexed by log component.
|
||||
extern const char * const _RKlcl_component_header[_RKlcl_component_t_count];
|
||||
|
||||
// Log component names, indexed by log component.
|
||||
extern const char * const _RKlcl_component_name[_RKlcl_component_t_count];
|
||||
|
||||
// Log level headers, indexed by log level.
|
||||
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 _RKlcl_level_name[_RKlcl_level_t_count];
|
||||
|
||||
// Version.
|
||||
extern const char * const _RKlcl_version;
|
||||
|
||||
// Log level symbols used by RKlcl_log, prefixed with '__RKlcl_log_symbol_RKlcl_v'.
|
||||
enum {
|
||||
__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 '__RKlcl_log_symbol_' prefix to a given symbol.
|
||||
#define __RKlcl_log_symbol(_symbol) \
|
||||
__RKlcl_log_symbol_##_symbol
|
||||
|
||||
|
||||
// End C linkage.
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
// Include logging back-end and definition of _RKlcl_logger.
|
||||
#import "lcl_config_logger_RK.h"
|
||||
|
||||
|
||||
// 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 _RKlcl_logger_autoreleasepool_arc 0
|
||||
#if defined(__has_feature)
|
||||
# if __has_feature(objc_arc)
|
||||
# undef _RKlcl_logger_autoreleasepool_arc
|
||||
# define _RKlcl_logger_autoreleasepool_arc 1
|
||||
# endif
|
||||
#endif
|
||||
#if _RKlcl_logger_autoreleasepool_arc
|
||||
# define _RKlcl_logger_autoreleasepool_begin \
|
||||
@autoreleasepool {
|
||||
# define _RKlcl_logger_autoreleasepool_end \
|
||||
}
|
||||
#else
|
||||
# define _RKlcl_logger_autoreleasepool_begin \
|
||||
NSAutoreleasePool *_RKlcl_logger_autoreleasepool = [[NSAutoreleasePool alloc] init];
|
||||
# define _RKlcl_logger_autoreleasepool_end \
|
||||
[_RKlcl_logger_autoreleasepool release];
|
||||
#endif
|
||||
|
||||
#ifndef _RKLCL_NO_IGNORE_WARNINGS
|
||||
# ifdef __clang__
|
||||
// Ignore some warnings about variadic macros when using '-Weverything'.
|
||||
# pragma clang diagnostic push
|
||||
# pragma clang diagnostic ignored "-Wunknown-pragmas"
|
||||
# pragma clang diagnostic ignored "-Wvariadic-macros"
|
||||
# pragma clang diagnostic ignored "-Wpedantic"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
// A simple default logger, which redirects to NSLog().
|
||||
#define _RKlcl_logger(_component, _level, _format, ...) { \
|
||||
_RKlcl_logger_autoreleasepool_begin \
|
||||
NSLog(@"%s %s:%@:%d " _format, \
|
||||
_RKlcl_level_header_1[_level], \
|
||||
_RKlcl_component_header[_component], \
|
||||
[@__FILE__ lastPathComponent], \
|
||||
__LINE__, \
|
||||
## __VA_ARGS__); \
|
||||
_RKlcl_logger_autoreleasepool_end \
|
||||
}
|
||||
|
||||
#ifndef _RKLCL_NO_IGNORE_WARNINGS
|
||||
# ifdef __clang__
|
||||
# pragma clang diagnostic pop
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
// Include extensions.
|
||||
#import "lcl_config_extensions_RK.h"
|
||||
|
||||
|
||||
#endif // __RKLCL_H__
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
//
|
||||
//
|
||||
// lcl.m -- LibComponentLogging
|
||||
// lcl_RK.m -- LibComponentLogging, embedded, RestKit/RK
|
||||
//
|
||||
//
|
||||
// Copyright (c) 2008-2011 Arne Harren <ah@0xc0.de>
|
||||
// Copyright (c) 2008-2012 Arne Harren <ah@0xc0.de>
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
@@ -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 <string.h>
|
||||
|
||||
|
||||
// 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 @@ const char * const _lcl_level_header[] = {
|
||||
"DEBUG",
|
||||
"TRACE"
|
||||
};
|
||||
const char * const _lcl_level_header_1[] = {
|
||||
const char * const _RKlcl_level_header_1[] = {
|
||||
"-",
|
||||
"C",
|
||||
"E",
|
||||
@@ -73,7 +73,7 @@ const char * const _lcl_level_header_1[] = {
|
||||
"D",
|
||||
"T"
|
||||
};
|
||||
const char * const _lcl_level_header_3[] = {
|
||||
const char * const _RKlcl_level_header_3[] = {
|
||||
"---",
|
||||
"CRI",
|
||||
"ERR",
|
||||
@@ -84,7 +84,7 @@ const char * const _lcl_level_header_3[] = {
|
||||
};
|
||||
|
||||
// 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 @@ const char * const _lcl_level_name[] = {
|
||||
};
|
||||
|
||||
// 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);
|
||||
}
|
||||
|
||||
@@ -1,69 +0,0 @@
|
||||
//
|
||||
//
|
||||
// lcl_config_components.h
|
||||
//
|
||||
//
|
||||
// Copyright (c) 2008-2011 Arne Harren <ah@0xc0.de>
|
||||
//
|
||||
// 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(<identifier>, <header>, <name>)
|
||||
//
|
||||
// for defining a log component, where
|
||||
//
|
||||
// - <identifier> is the unique name of a log component which is used in calls
|
||||
// to lcl_log etc. A symbol 'lcl_c<identifier>' is automatically created for
|
||||
// each log component.
|
||||
//
|
||||
// - <header> 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'.
|
||||
//
|
||||
// - <name> 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")
|
||||
|
||||
@@ -1,35 +0,0 @@
|
||||
//
|
||||
//
|
||||
// lcl_config_extensions.h
|
||||
//
|
||||
//
|
||||
// Copyright (c) 2008-2011 Arne Harren <ah@0xc0.de>
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
|
||||
@@ -1,80 +0,0 @@
|
||||
//
|
||||
//
|
||||
// lcl_config_logger.h
|
||||
//
|
||||
//
|
||||
// Copyright (c) 2008-2011 Arne Harren <ah@0xc0.de>
|
||||
//
|
||||
// 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, ...) <logging action>
|
||||
//
|
||||
|
||||
|
||||
//
|
||||
// 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 \
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//
|
||||
//
|
||||
// LCLNSLog.h
|
||||
// LCLNSLog_RK.h
|
||||
//
|
||||
//
|
||||
// Copyright (c) 2008-2011 Arne Harren <ah@0xc0.de>
|
||||
@@ -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
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
//
|
||||
//
|
||||
// LCLNSLog.m
|
||||
// LCLNSLog_RK.m
|
||||
//
|
||||
//
|
||||
// Copyright (c) 2008-2009 Arne Harren <ah@0xc0.de>
|
||||
@@ -1,29 +0,0 @@
|
||||
//
|
||||
//
|
||||
// lcl_config_logger.h
|
||||
//
|
||||
//
|
||||
// Copyright (c) 2008-2009 Arne Harren <ah@0xc0.de>
|
||||
//
|
||||
// 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.
|
||||
|
||||
|
||||
// Use the LCLNSLog logger.
|
||||
#import "LCLNSLog.h"
|
||||
|
||||
2
Vendor/iso8601parser/ISO8601DateFormatter.m
vendored
2
Vendor/iso8601parser/ISO8601DateFormatter.m
vendored
@@ -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 ':'
|
||||
|
||||
Reference in New Issue
Block a user