motion-yapper 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -2
- data/.travis.yml +2 -0
- data/Gemfile +1 -0
- data/README.md +1 -1
- data/Rakefile +1 -1
- data/lib/motion-yapper.rb +1 -0
- data/lib/yapper.rb +3 -5
- data/lib/yapper/config.rb +2 -0
- data/lib/yapper/db.rb +105 -40
- data/lib/yapper/document.rb +7 -4
- data/lib/yapper/document/callbacks.rb +0 -7
- data/lib/yapper/document/{persistance.rb → persistence.rb} +27 -21
- data/lib/yapper/document/relation.rb +29 -22
- data/lib/yapper/document/selection.rb +122 -54
- data/lib/yapper/extensions.rb +12 -24
- data/lib/yapper/settings.rb +43 -0
- data/lib/yapper/timestamps.rb +2 -0
- data/lib/yapper/version.rb +1 -1
- data/{yapper.gemspec → motion-yapper.gemspec} +0 -0
- data/spec/integration/{where_spec.rb → criteria_spec.rb} +78 -10
- data/spec/integration/db_spec.rb +70 -0
- data/spec/integration/defaults_spec.rb +37 -0
- data/spec/integration/extensions_spec.rb +14 -0
- data/spec/integration/{persistance_spec.rb → persistence_spec.rb} +0 -0
- data/spec/integration/relation_spec.rb +4 -4
- data/vendor/Podfile.lock +9 -11
- data/vendor/Pods/.build/libPods-CocoaLumberjack.a +0 -0
- data/vendor/Pods/.build/libPods-NSData+MD5Digest.a +0 -0
- data/vendor/Pods/.build/libPods-YapDatabase.a +0 -0
- data/vendor/Pods/.build/libPods.a +0 -0
- data/vendor/Pods/BuildHeaders/CocoaLumberjack/DDASLLogger.h +4 -4
- data/vendor/Pods/BuildHeaders/CocoaLumberjack/DDAbstractDatabaseLogger.h +14 -14
- data/vendor/Pods/{CocoaLumberjack/Lumberjack/Extensions/ContextFilterLogFormatter.h → BuildHeaders/CocoaLumberjack/DDContextFilterLogFormatter.h} +6 -8
- data/vendor/Pods/BuildHeaders/CocoaLumberjack/{DispatchQueueLogFormatter.h → DDDispatchQueueLogFormatter.h} +18 -6
- data/vendor/Pods/BuildHeaders/CocoaLumberjack/DDFileLogger.h +67 -32
- data/vendor/Pods/BuildHeaders/CocoaLumberjack/DDLog+LOGV.h +99 -0
- data/vendor/Pods/BuildHeaders/CocoaLumberjack/DDLog.h +98 -65
- data/vendor/Pods/BuildHeaders/CocoaLumberjack/DDMultiFormatter.h +30 -0
- data/vendor/Pods/BuildHeaders/CocoaLumberjack/DDTTYLogger.h +39 -25
- data/vendor/Pods/BuildHeaders/YapDatabase/NSDictionary+YapDatabase.h +8 -0
- data/vendor/Pods/BuildHeaders/YapDatabase/YapCache.h +1 -0
- data/vendor/Pods/BuildHeaders/YapDatabase/YapCollectionKey.h +3 -0
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabase.h +4 -4
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseConnection.h +21 -19
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseDefaults.h +1 -1
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseExtensionPrivate.h +35 -31
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseFilteredView.h +8 -35
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseFilteredViewPrivate.h +0 -2
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseFilteredViewTransaction.h +17 -17
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseFilteredViewTypes.h +32 -0
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseFullTextSearchPrivate.h +8 -0
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabasePrivate.h +43 -21
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseRelationship.h +35 -0
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseRelationshipConnection.h +29 -0
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseRelationshipEdge.h +163 -0
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseRelationshipEdgePrivate.h +79 -0
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseRelationshipNode.h +99 -0
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseRelationshipOptions.h +59 -0
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseRelationshipPrivate.h +125 -0
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseRelationshipTransaction.h +384 -0
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseSecondaryIndex.h +49 -0
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseSecondaryIndexPrivate.h +10 -0
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseSecondaryIndexSetupPrivate.h +18 -0
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseTransaction.h +131 -21
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseView.h +48 -107
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewChange.h +2 -2
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewConnection.h +1 -0
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewMappings.h +17 -0
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewOptions.h +10 -3
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewPrivate.h +18 -1
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewTransaction.h +75 -24
- data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewTypes.h +99 -0
- data/vendor/Pods/CocoaLumberjack/Lumberjack/DDASLLogger.h +4 -4
- data/vendor/Pods/CocoaLumberjack/Lumberjack/DDASLLogger.m +51 -50
- data/vendor/Pods/CocoaLumberjack/Lumberjack/DDAbstractDatabaseLogger.h +14 -14
- data/vendor/Pods/CocoaLumberjack/Lumberjack/DDAbstractDatabaseLogger.m +546 -546
- data/vendor/Pods/CocoaLumberjack/Lumberjack/DDFileLogger.h +67 -32
- data/vendor/Pods/CocoaLumberjack/Lumberjack/DDFileLogger.m +1093 -907
- data/vendor/Pods/CocoaLumberjack/Lumberjack/DDLog+LOGV.h +99 -0
- data/vendor/Pods/CocoaLumberjack/Lumberjack/DDLog.h +98 -65
- data/vendor/Pods/CocoaLumberjack/Lumberjack/DDLog.m +873 -748
- data/vendor/Pods/CocoaLumberjack/Lumberjack/DDTTYLogger.h +39 -25
- data/vendor/Pods/CocoaLumberjack/Lumberjack/DDTTYLogger.m +1284 -1243
- data/vendor/Pods/{BuildHeaders/CocoaLumberjack/ContextFilterLogFormatter.h → CocoaLumberjack/Lumberjack/Extensions/DDContextFilterLogFormatter.h} +6 -8
- data/vendor/Pods/CocoaLumberjack/Lumberjack/Extensions/{ContextFilterLogFormatter.m → DDContextFilterLogFormatter.m} +70 -70
- data/vendor/Pods/CocoaLumberjack/Lumberjack/Extensions/{DispatchQueueLogFormatter.h → DDDispatchQueueLogFormatter.h} +18 -6
- data/vendor/Pods/CocoaLumberjack/Lumberjack/Extensions/DDDispatchQueueLogFormatter.m +253 -0
- data/vendor/Pods/CocoaLumberjack/Lumberjack/Extensions/DDMultiFormatter.h +30 -0
- data/vendor/Pods/CocoaLumberjack/Lumberjack/Extensions/DDMultiFormatter.m +127 -0
- data/vendor/Pods/CocoaLumberjack/Lumberjack/Extensions/README.txt +1 -1
- data/vendor/Pods/CocoaLumberjack/README.markdown +52 -15
- data/vendor/Pods/Headers/CocoaLumberjack/DDASLLogger.h +4 -4
- data/vendor/Pods/Headers/CocoaLumberjack/DDAbstractDatabaseLogger.h +14 -14
- data/vendor/Pods/Headers/CocoaLumberjack/{ContextFilterLogFormatter.h → DDContextFilterLogFormatter.h} +6 -8
- data/vendor/Pods/Headers/CocoaLumberjack/{DispatchQueueLogFormatter.h → DDDispatchQueueLogFormatter.h} +18 -6
- data/vendor/Pods/Headers/CocoaLumberjack/DDFileLogger.h +67 -32
- data/vendor/Pods/Headers/CocoaLumberjack/DDLog+LOGV.h +99 -0
- data/vendor/Pods/Headers/CocoaLumberjack/DDLog.h +98 -65
- data/vendor/Pods/Headers/CocoaLumberjack/DDMultiFormatter.h +30 -0
- data/vendor/Pods/Headers/CocoaLumberjack/DDTTYLogger.h +39 -25
- data/vendor/Pods/Headers/YapDatabase/YapCollectionKey.h +3 -0
- data/vendor/Pods/Headers/YapDatabase/YapDatabase.h +4 -4
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseConnection.h +21 -19
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseFilteredView.h +8 -35
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseFilteredViewTransaction.h +17 -17
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseFilteredViewTypes.h +32 -0
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseRelationship.h +35 -0
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseRelationshipConnection.h +29 -0
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseRelationshipEdge.h +163 -0
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseRelationshipNode.h +99 -0
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseRelationshipOptions.h +59 -0
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseRelationshipTransaction.h +384 -0
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseSecondaryIndex.h +49 -0
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseTransaction.h +131 -21
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseView.h +48 -107
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseViewChange.h +2 -2
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseViewConnection.h +1 -0
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseViewMappings.h +17 -0
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseViewOptions.h +10 -3
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseViewTransaction.h +75 -24
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseViewTypes.h +99 -0
- data/vendor/Pods/Headers/____Pods-CocoaLumberjack-prefix.h +2 -0
- data/vendor/Pods/Headers/____Pods-environment.h +15 -15
- data/vendor/Pods/Manifest.lock +9 -11
- data/vendor/Pods/Pods-CocoaLumberjack-Private.xcconfig +1 -1
- data/vendor/Pods/Pods-CocoaLumberjack-prefix.pch +2 -0
- data/vendor/Pods/Pods-NSData+MD5Digest-Private.xcconfig +1 -1
- data/vendor/Pods/Pods-YapDatabase-Private.xcconfig +1 -1
- data/vendor/Pods/{Pods-Acknowledgements.markdown → Pods-acknowledgements.markdown} +0 -37
- data/vendor/Pods/{Pods-Acknowledgements.plist → Pods-acknowledgements.plist} +0 -45
- data/vendor/Pods/Pods-environment.h +15 -15
- data/vendor/Pods/Pods.xcconfig +3 -3
- data/vendor/Pods/Pods.xcodeproj/project.pbxproj +2426 -3155
- data/vendor/Pods/Pods.xcodeproj/xcuserdata/kareemk.xcuserdatad/xcschemes/Pods-CocoaLumberjack.xcscheme +59 -0
- data/vendor/Pods/Pods.xcodeproj/xcuserdata/kareemk.xcuserdatad/xcschemes/Pods-NSData+MD5Digest.xcscheme +59 -0
- data/vendor/Pods/Pods.xcodeproj/xcuserdata/kareemk.xcuserdatad/xcschemes/Pods-YapDatabase.xcscheme +59 -0
- data/vendor/Pods/Pods.xcodeproj/xcuserdata/kareemk.xcuserdatad/xcschemes/Pods.xcscheme +59 -0
- data/vendor/Pods/Pods.xcodeproj/xcuserdata/kareemk.xcuserdatad/xcschemes/xcschememanagement.plist +31 -0
- data/vendor/Pods/YapDatabase/README.md +3 -1
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FilteredViews/Internal/YapDatabaseFilteredViewPrivate.h +0 -2
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FilteredViews/YapDatabaseFilteredView.h +8 -35
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FilteredViews/YapDatabaseFilteredView.m +25 -41
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FilteredViews/YapDatabaseFilteredViewTransaction.h +17 -17
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FilteredViews/YapDatabaseFilteredViewTransaction.m +403 -134
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FilteredViews/YapDatabaseFilteredViewTypes.h +32 -0
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FullTextSearch/Internal/YapDatabaseFullTextSearchPrivate.h +8 -0
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FullTextSearch/YapDatabaseFullTextSearchConnection.m +8 -8
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FullTextSearch/YapDatabaseFullTextSearchTransaction.m +113 -62
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Protocol/Internal/YapDatabaseExtensionPrivate.h +35 -31
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Protocol/YapDatabaseExtension.m +25 -0
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Protocol/YapDatabaseExtensionConnection.m +1 -1
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Protocol/YapDatabaseExtensionTransaction.m +25 -1
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/Internal/YapDatabaseRelationshipEdgePrivate.h +79 -0
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/Internal/YapDatabaseRelationshipPrivate.h +125 -0
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationship.h +35 -0
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationship.m +129 -0
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationshipConnection.h +29 -0
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationshipConnection.m +802 -0
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationshipEdge.h +163 -0
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationshipEdge.m +408 -0
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationshipNode.h +99 -0
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationshipOptions.h +59 -0
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationshipOptions.m +29 -0
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationshipTransaction.h +384 -0
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationshipTransaction.m +5254 -0
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/SecondaryIndex/Internal/YapDatabaseSecondaryIndexPrivate.h +10 -0
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/SecondaryIndex/Internal/YapDatabaseSecondaryIndexSetupPrivate.h +18 -0
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/SecondaryIndex/YapDatabaseSecondaryIndex.h +49 -0
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/SecondaryIndex/YapDatabaseSecondaryIndex.m +12 -0
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/SecondaryIndex/YapDatabaseSecondaryIndexConnection.m +9 -8
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/SecondaryIndex/YapDatabaseSecondaryIndexSetup.m +62 -1
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/SecondaryIndex/YapDatabaseSecondaryIndexTransaction.m +148 -45
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Internal/YapDatabaseViewPrivate.h +18 -1
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Utilities/YapDatabaseViewChange.h +2 -2
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Utilities/YapDatabaseViewChange.m +15 -9
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Utilities/YapDatabaseViewMappings.h +17 -0
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Utilities/YapDatabaseViewMappings.m +211 -64
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/YapDatabaseView.h +48 -107
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/YapDatabaseView.m +10 -7
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/YapDatabaseViewConnection.h +1 -0
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/YapDatabaseViewConnection.m +13 -22
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/YapDatabaseViewOptions.h +10 -3
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/YapDatabaseViewTransaction.h +75 -24
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/YapDatabaseViewTransaction.m +725 -244
- data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/YapDatabaseViewTypes.h +99 -0
- data/vendor/Pods/YapDatabase/YapDatabase/Internal/NSDictionary+YapDatabase.h +8 -0
- data/vendor/Pods/YapDatabase/YapDatabase/Internal/NSDictionary+YapDatabase.m +19 -0
- data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapCache.h +1 -0
- data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapCache.m +12 -0
- data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapDatabaseDefaults.h +1 -1
- data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapDatabaseDefaults.m +3 -3
- data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapDatabasePrivate.h +43 -21
- data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapNull.m +4 -0
- data/vendor/Pods/YapDatabase/YapDatabase/Utilities/YapCollectionKey.h +3 -0
- data/vendor/Pods/YapDatabase/YapDatabase/Utilities/YapCollectionKey.m +5 -0
- data/vendor/Pods/YapDatabase/YapDatabase/YapDatabase.h +4 -4
- data/vendor/Pods/YapDatabase/YapDatabase/YapDatabase.m +84 -93
- data/vendor/Pods/YapDatabase/YapDatabase/YapDatabaseConnection.h +21 -19
- data/vendor/Pods/YapDatabase/YapDatabase/YapDatabaseConnection.m +381 -209
- data/vendor/Pods/YapDatabase/YapDatabase/YapDatabaseTransaction.h +131 -21
- data/vendor/Pods/YapDatabase/YapDatabase/YapDatabaseTransaction.m +587 -267
- data/vendor/Pods/{Pods.bridgesupport → build-iPhoneSimulator/Pods.bridgesupport} +633 -2557
- data/vendor/Pods/build-iPhoneSimulator/libPods.a +0 -0
- data/vendor/YapDatabaseRubyMotion/YapDatabaseRubyMotion.bridgesupport +2 -1
- data/vendor/YapDatabaseRubyMotion/YapDatabaseRubyMotion.h +2 -1
- data/vendor/YapDatabaseRubyMotion/YapDatabaseRubyMotion.m +4 -2
- metadata +80 -108
- data/Gemfile.lock +0 -63
- data/lib/yapper/attachment.rb +0 -48
- data/lib/yapper/document/attachment.rb +0 -26
- data/lib/yapper/sync.rb +0 -134
- data/lib/yapper/sync/data.rb +0 -12
- data/lib/yapper/sync/event.rb +0 -194
- data/lib/yapper/sync/queue.rb +0 -164
- data/spec/integration/all_spec.rb +0 -40
- data/spec/integration/sync_spec.rb +0 -42
- data/vendor/Pods/AFNetworking/AFNetworking/AFHTTPClient.h +0 -641
- data/vendor/Pods/AFNetworking/AFNetworking/AFHTTPClient.m +0 -1396
- data/vendor/Pods/AFNetworking/AFNetworking/AFHTTPRequestOperation.h +0 -133
- data/vendor/Pods/AFNetworking/AFNetworking/AFHTTPRequestOperation.m +0 -327
- data/vendor/Pods/AFNetworking/AFNetworking/AFImageRequestOperation.h +0 -113
- data/vendor/Pods/AFNetworking/AFNetworking/AFImageRequestOperation.m +0 -321
- data/vendor/Pods/AFNetworking/AFNetworking/AFJSONRequestOperation.h +0 -71
- data/vendor/Pods/AFNetworking/AFNetworking/AFJSONRequestOperation.m +0 -150
- data/vendor/Pods/AFNetworking/AFNetworking/AFNetworkActivityIndicatorManager.h +0 -75
- data/vendor/Pods/AFNetworking/AFNetworking/AFNetworkActivityIndicatorManager.m +0 -157
- data/vendor/Pods/AFNetworking/AFNetworking/AFNetworking.h +0 -43
- data/vendor/Pods/AFNetworking/AFNetworking/AFPropertyListRequestOperation.h +0 -68
- data/vendor/Pods/AFNetworking/AFNetworking/AFPropertyListRequestOperation.m +0 -143
- data/vendor/Pods/AFNetworking/AFNetworking/AFURLConnectionOperation.h +0 -370
- data/vendor/Pods/AFNetworking/AFNetworking/AFURLConnectionOperation.m +0 -848
- data/vendor/Pods/AFNetworking/AFNetworking/AFXMLRequestOperation.h +0 -89
- data/vendor/Pods/AFNetworking/AFNetworking/AFXMLRequestOperation.m +0 -167
- data/vendor/Pods/AFNetworking/AFNetworking/UIImageView+AFNetworking.h +0 -78
- data/vendor/Pods/AFNetworking/AFNetworking/UIImageView+AFNetworking.m +0 -191
- data/vendor/Pods/AFNetworking/LICENSE +0 -19
- data/vendor/Pods/AFNetworking/README.md +0 -208
- data/vendor/Pods/BuildHeaders/AFNetworking/AFHTTPClient.h +0 -641
- data/vendor/Pods/BuildHeaders/AFNetworking/AFHTTPRequestOperation.h +0 -133
- data/vendor/Pods/BuildHeaders/AFNetworking/AFImageRequestOperation.h +0 -113
- data/vendor/Pods/BuildHeaders/AFNetworking/AFJSONRequestOperation.h +0 -71
- data/vendor/Pods/BuildHeaders/AFNetworking/AFNetworkActivityIndicatorManager.h +0 -75
- data/vendor/Pods/BuildHeaders/AFNetworking/AFNetworking.h +0 -43
- data/vendor/Pods/BuildHeaders/AFNetworking/AFPropertyListRequestOperation.h +0 -68
- data/vendor/Pods/BuildHeaders/AFNetworking/AFURLConnectionOperation.h +0 -370
- data/vendor/Pods/BuildHeaders/AFNetworking/AFXMLRequestOperation.h +0 -89
- data/vendor/Pods/BuildHeaders/AFNetworking/UIImageView+AFNetworking.h +0 -78
- data/vendor/Pods/BuildHeaders/Reachability/Reachability.h +0 -109
- data/vendor/Pods/CocoaLumberjack/Lumberjack/Extensions/DispatchQueueLogFormatter.m +0 -251
- data/vendor/Pods/Headers/AFNetworking/AFHTTPClient.h +0 -641
- data/vendor/Pods/Headers/AFNetworking/AFHTTPRequestOperation.h +0 -133
- data/vendor/Pods/Headers/AFNetworking/AFImageRequestOperation.h +0 -113
- data/vendor/Pods/Headers/AFNetworking/AFJSONRequestOperation.h +0 -71
- data/vendor/Pods/Headers/AFNetworking/AFNetworkActivityIndicatorManager.h +0 -75
- data/vendor/Pods/Headers/AFNetworking/AFNetworking.h +0 -43
- data/vendor/Pods/Headers/AFNetworking/AFPropertyListRequestOperation.h +0 -68
- data/vendor/Pods/Headers/AFNetworking/AFURLConnectionOperation.h +0 -370
- data/vendor/Pods/Headers/AFNetworking/AFXMLRequestOperation.h +0 -89
- data/vendor/Pods/Headers/AFNetworking/UIImageView+AFNetworking.h +0 -78
- data/vendor/Pods/Headers/Reachability/Reachability.h +0 -109
- data/vendor/Pods/Headers/YapDatabase/YapCache.h +0 -90
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseConnectionState.h +0 -29
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseDefaults.h +0 -37
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseExtensionPrivate.h +0 -440
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseFilteredViewPrivate.h +0 -19
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseFullTextSearchPrivate.h +0 -69
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseLogging.h +0 -158
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseManager.h +0 -17
- data/vendor/Pods/Headers/YapDatabase/YapDatabasePrivate.h +0 -424
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseSecondaryIndexPrivate.h +0 -73
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseStatement.h +0 -13
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseString.h +0 -121
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseViewChangePrivate.h +0 -94
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseViewMappingsPrivate.h +0 -72
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseViewPage.h +0 -36
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseViewPageMetadata.h +0 -27
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseViewPrivate.h +0 -153
- data/vendor/Pods/Headers/YapDatabase/YapDatabaseViewRangeOptionsPrivate.h +0 -17
- data/vendor/Pods/Headers/YapDatabase/YapMemoryTable.h +0 -74
- data/vendor/Pods/Headers/YapDatabase/YapNull.h +0 -17
- data/vendor/Pods/Headers/YapDatabase/YapTouch.h +0 -15
- data/vendor/Pods/Headers/____Pods-AFNetworking-prefix.h +0 -17
- data/vendor/Pods/Headers/____Pods-Reachability-prefix.h +0 -5
- data/vendor/Pods/Pods-AFNetworking-Private.xcconfig +0 -5
- data/vendor/Pods/Pods-AFNetworking-dummy.m +0 -5
- data/vendor/Pods/Pods-AFNetworking-prefix.pch +0 -17
- data/vendor/Pods/Pods-AFNetworking.xcconfig +0 -1
- data/vendor/Pods/Pods-Reachability-Private.xcconfig +0 -5
- data/vendor/Pods/Pods-Reachability-dummy.m +0 -5
- data/vendor/Pods/Pods-Reachability-prefix.pch +0 -5
- data/vendor/Pods/Pods-Reachability.xcconfig +0 -1
- data/vendor/Pods/Reachability/LICENCE.txt +0 -24
- data/vendor/Pods/Reachability/README.md +0 -65
- data/vendor/Pods/Reachability/Reachability.h +0 -109
- data/vendor/Pods/Reachability/Reachability.m +0 -527
@@ -0,0 +1,99 @@
|
|
1
|
+
//
|
2
|
+
// DDLog+LOGV.h
|
3
|
+
// Lumberjack
|
4
|
+
//
|
5
|
+
// Created by Mike Pontillo on 11/20/12.
|
6
|
+
//
|
7
|
+
//
|
8
|
+
|
9
|
+
#ifndef Lumberjack_DDLog_LOGV_h
|
10
|
+
#define Lumberjack_DDLog_LOGV_h
|
11
|
+
|
12
|
+
#import "DDLog.h"
|
13
|
+
|
14
|
+
|
15
|
+
#define LOGV_MACRO(isAsynchronous, lvl, flg, ctx, atag, fnct, frmt, avalist) \
|
16
|
+
[DDLog log:isAsynchronous \
|
17
|
+
level:lvl \
|
18
|
+
flag:flg \
|
19
|
+
context:ctx \
|
20
|
+
file:__FILE__ \
|
21
|
+
function:fnct \
|
22
|
+
line:__LINE__ \
|
23
|
+
tag:atag \
|
24
|
+
format:frmt \
|
25
|
+
args:avalist]
|
26
|
+
|
27
|
+
#define LOGV_OBJC_MACRO(async, lvl, flg, ctx, frmt, avalist) \
|
28
|
+
LOGV_MACRO(async, lvl, flg, ctx, nil, sel_getName(_cmd), frmt, avalist)
|
29
|
+
|
30
|
+
#define LOGV_C_MACRO(async, lvl, flg, ctx, frmt, avalist) \
|
31
|
+
LOGV_MACRO(async, lvl, flg, ctx, nil, __FUNCTION__, frmt, avalist)
|
32
|
+
|
33
|
+
|
34
|
+
|
35
|
+
#define SYNC_LOGV_OBJC_MACRO(lvl, flg, ctx, frmt, avalist) \
|
36
|
+
LOGV_OBJC_MACRO( NO, lvl, flg, ctx, frmt, avalist)
|
37
|
+
|
38
|
+
#define ASYNC_LOGV_OBJC_MACRO(lvl, flg, ctx, frmt, avalist) \
|
39
|
+
LOGV_OBJC_MACRO(YES, lvl, flg, ctx, frmt, avalist)
|
40
|
+
|
41
|
+
#define SYNC_LOGV_C_MACRO(lvl, flg, ctx, frmt, avalist) \
|
42
|
+
LOGV_C_MACRO( NO, lvl, flg, ctx, frmt, avalist)
|
43
|
+
|
44
|
+
#define ASYNC_LOGV_C_MACRO(lvl, flg, ctx, frmt, avalist) \
|
45
|
+
LOGV_C_MACRO(YES, lvl, flg, ctx, frmt, avalist)
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
#define LOGV_MAYBE(async, lvl, flg, ctx, fnct, frmt, avalist) \
|
50
|
+
do { if(lvl & flg) LOGV_MACRO(async, lvl, flg, ctx, nil, fnct, frmt, avalist); } while(0)
|
51
|
+
|
52
|
+
#define LOGV_OBJC_MAYBE(async, lvl, flg, ctx, frmt, avalist) \
|
53
|
+
LOGV_MAYBE(async, lvl, flg, ctx, sel_getName(_cmd), frmt, avalist)
|
54
|
+
|
55
|
+
#define LOGV_C_MAYBE(async, lvl, flg, ctx, frmt, avalist) \
|
56
|
+
LOGV_MAYBE(async, lvl, flg, ctx, __FUNCTION__, frmt, avalist)
|
57
|
+
|
58
|
+
#define SYNC_LOGV_OBJC_MAYBE(lvl, flg, ctx, frmt, avalist) \
|
59
|
+
LOGV_OBJC_MAYBE( NO, lvl, flg, ctx, frmt, avalist)
|
60
|
+
|
61
|
+
#define ASYNC_LOGV_OBJC_MAYBE(lvl, flg, ctx, frmt, avalist) \
|
62
|
+
LOGV_OBJC_MAYBE(YES, lvl, flg, ctx, frmt, avalist)
|
63
|
+
|
64
|
+
#define SYNC_LOGV_C_MAYBE(lvl, flg, ctx, frmt, avalist) \
|
65
|
+
LOGV_C_MAYBE( NO, lvl, flg, ctx, frmt, avalist)
|
66
|
+
|
67
|
+
#define ASYNC_LOGV_C_MAYBE(lvl, flg, ctx, frmt, avalist) \
|
68
|
+
LOGV_C_MAYBE(YES, lvl, flg, ctx, frmt, avalist)
|
69
|
+
|
70
|
+
|
71
|
+
|
72
|
+
#define LOGV_OBJC_TAG_MACRO(async, lvl, flg, ctx, tag, frmt, avalist) \
|
73
|
+
LOGV_MACRO(async, lvl, flg, ctx, tag, sel_getName(_cmd), frmt, avalist)
|
74
|
+
|
75
|
+
#define LOGV_C_TAG_MACRO(async, lvl, flg, ctx, tag, frmt, avalist) \
|
76
|
+
LOGV_MACRO(async, lvl, flg, ctx, tag, __FUNCTION__, frmt, avalist)
|
77
|
+
|
78
|
+
#define LOGV_TAG_MAYBE(async, lvl, flg, ctx, tag, fnct, frmt, avalist) \
|
79
|
+
do { if(lvl & flg) LOGV_MACRO(async, lvl, flg, ctx, tag, fnct, frmt, avalist); } while(0)
|
80
|
+
|
81
|
+
#define LOGV_OBJC_TAG_MAYBE(async, lvl, flg, ctx, tag, frmt, avalist) \
|
82
|
+
LOGV_TAG_MAYBE(async, lvl, flg, ctx, tag, sel_getName(_cmd), frmt, avalist)
|
83
|
+
|
84
|
+
#define LOGV_C_TAG_MAYBE(async, lvl, flg, ctx, tag, frmt, avalist) \
|
85
|
+
LOGV_TAG_MAYBE(async, lvl, flg, ctx, tag, __FUNCTION__, frmt, avalist)
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
#define DDLogvError(frmt, avalist) LOGV_OBJC_MAYBE(LOG_ASYNC_ERROR, ddLogLevel, LOG_FLAG_ERROR, 0, frmt, avalist)
|
90
|
+
#define DDLogvWarn(frmt, avalist) LOGV_OBJC_MAYBE(LOG_ASYNC_WARN, ddLogLevel, LOG_FLAG_WARN, 0, frmt, avalist)
|
91
|
+
#define DDLogvInfo(frmt, avalist) LOGV_OBJC_MAYBE(LOG_ASYNC_INFO, ddLogLevel, LOG_FLAG_INFO, 0, frmt, avalist)
|
92
|
+
#define DDLogvVerbose(frmt, avalist) LOGV_OBJC_MAYBE(LOG_ASYNC_VERBOSE, ddLogLevel, LOG_FLAG_VERBOSE, 0, frmt, avalist)
|
93
|
+
|
94
|
+
#define DDLogvCError(frmt, avalist) LOGV_C_MAYBE(LOG_ASYNC_ERROR, ddLogLevel, LOG_FLAG_ERROR, 0, frmt, avalist)
|
95
|
+
#define DDLogvCWarn(frmt, avalist) LOGV_C_MAYBE(LOG_ASYNC_WARN, ddLogLevel, LOG_FLAG_WARN, 0, frmt, avalist)
|
96
|
+
#define DDLogvCInfo(frmt, avalist) LOGV_C_MAYBE(LOG_ASYNC_INFO, ddLogLevel, LOG_FLAG_INFO, 0, frmt, avalist)
|
97
|
+
#define DDLogvCVerbose(frmt, avalist) LOGV_C_MAYBE(LOG_ASYNC_VERBOSE, ddLogLevel, LOG_FLAG_VERBOSE, 0, frmt, avalist)
|
98
|
+
|
99
|
+
#endif
|
@@ -4,10 +4,10 @@
|
|
4
4
|
* Welcome to Cocoa Lumberjack!
|
5
5
|
*
|
6
6
|
* The project page has a wealth of documentation if you have any questions.
|
7
|
-
* https://github.com/
|
7
|
+
* https://github.com/CocoaLumberjack/CocoaLumberjack
|
8
8
|
*
|
9
9
|
* If you're new to the project you may wish to read the "Getting Started" wiki.
|
10
|
-
* https://github.com/
|
10
|
+
* https://github.com/CocoaLumberjack/CocoaLumberjack/wiki/GettingStarted
|
11
11
|
*
|
12
12
|
* Otherwise, here is a quick refresher.
|
13
13
|
* There are three steps to using the macros:
|
@@ -23,6 +23,18 @@
|
|
23
23
|
* // Log levels: off, error, warn, info, verbose
|
24
24
|
* static const int ddLogLevel = LOG_LEVEL_VERBOSE;
|
25
25
|
*
|
26
|
+
* Step 2 [3rd party frameworks]:
|
27
|
+
*
|
28
|
+
* Define your LOG_LEVEL_DEF to a different variable/function than ddLogLevel:
|
29
|
+
*
|
30
|
+
* // #undef LOG_LEVEL_DEF // Undefine first only if needed
|
31
|
+
* #define LOG_LEVEL_DEF myLibLogLevel
|
32
|
+
*
|
33
|
+
* Define your logging level in your implementation file:
|
34
|
+
*
|
35
|
+
* // Log levels: off, error, warn, info, verbose
|
36
|
+
* static const int myLibLogLevel = LOG_LEVEL_VERBOSE;
|
37
|
+
*
|
26
38
|
* Step 3:
|
27
39
|
* Replace your NSLog statements with DDLog statements according to the severity of the message.
|
28
40
|
*
|
@@ -32,6 +44,9 @@
|
|
32
44
|
* This means you can pass it multiple variables just like NSLog.
|
33
45
|
**/
|
34
46
|
|
47
|
+
#ifndef LOG_LEVEL_DEF
|
48
|
+
#define LOG_LEVEL_DEF ddLogLevel
|
49
|
+
#endif
|
35
50
|
|
36
51
|
@class DDLogMessage;
|
37
52
|
|
@@ -85,6 +100,8 @@
|
|
85
100
|
*
|
86
101
|
* if (logFlagForThisLogMsg & ddLogLevel) { execute log message }
|
87
102
|
*
|
103
|
+
* When LOG_LEVEL_DEF is defined as ddLogLevel.
|
104
|
+
*
|
88
105
|
* As shown further below, Lumberjack actually uses a bitmask as opposed to primitive log levels.
|
89
106
|
* This allows for a great amount of flexibility and some pretty advanced fine grained logging techniques.
|
90
107
|
*
|
@@ -151,11 +168,11 @@
|
|
151
168
|
*
|
152
169
|
* More advanced users may choose to completely customize the levels (and level names) to suite their needs.
|
153
170
|
* For more information on this see the "Custom Log Levels" page:
|
154
|
-
* https://github.com/
|
171
|
+
* https://github.com/CocoaLumberjack/CocoaLumberjack/wiki/CustomLogLevels
|
155
172
|
*
|
156
173
|
* Advanced users may also notice that we're using a bitmask.
|
157
174
|
* This is to allow for custom fine grained logging:
|
158
|
-
* https://github.com/
|
175
|
+
* https://github.com/CocoaLumberjack/CocoaLumberjack/wiki/FineGrainedLogging
|
159
176
|
*
|
160
177
|
* -- Flags --
|
161
178
|
*
|
@@ -166,6 +183,8 @@
|
|
166
183
|
*
|
167
184
|
* static const int ddLogLevel = LOG_FLAG_ERROR | LOG_FLAG_INFO;
|
168
185
|
*
|
186
|
+
* When LOG_LEVEL_DEF is defined as ddLogLevel.
|
187
|
+
*
|
169
188
|
* Flags may also be consulted when writing custom log formatters,
|
170
189
|
* as the DDLogMessage class captures the individual flag that caused the log message to fire.
|
171
190
|
*
|
@@ -202,41 +221,47 @@
|
|
202
221
|
* Instead, create your own MyLogging.h or ApplicationNameLogging.h or CompanyLogging.h
|
203
222
|
*
|
204
223
|
* For an example of customizing your logging experience, see the "Custom Log Levels" page:
|
205
|
-
* https://github.com/
|
224
|
+
* https://github.com/CocoaLumberjack/CocoaLumberjack/wiki/CustomLogLevels
|
206
225
|
**/
|
207
226
|
|
208
|
-
#define LOG_FLAG_ERROR (1 << 0) // 0...
|
209
|
-
#define LOG_FLAG_WARN (1 << 1) // 0...
|
210
|
-
#define LOG_FLAG_INFO (1 << 2) // 0...
|
211
|
-
#define
|
227
|
+
#define LOG_FLAG_ERROR (1 << 0) // 0...00001
|
228
|
+
#define LOG_FLAG_WARN (1 << 1) // 0...00010
|
229
|
+
#define LOG_FLAG_INFO (1 << 2) // 0...00100
|
230
|
+
#define LOG_FLAG_DEBUG (1 << 3) // 0...01000
|
231
|
+
#define LOG_FLAG_VERBOSE (1 << 4) // 0...10000
|
212
232
|
|
213
233
|
#define LOG_LEVEL_OFF 0
|
214
|
-
#define LOG_LEVEL_ERROR (LOG_FLAG_ERROR)
|
215
|
-
#define LOG_LEVEL_WARN (LOG_FLAG_ERROR | LOG_FLAG_WARN)
|
216
|
-
#define LOG_LEVEL_INFO (LOG_FLAG_ERROR | LOG_FLAG_WARN | LOG_FLAG_INFO)
|
217
|
-
#define
|
218
|
-
|
219
|
-
|
220
|
-
#define
|
221
|
-
#define
|
222
|
-
#define
|
234
|
+
#define LOG_LEVEL_ERROR (LOG_FLAG_ERROR) // 0...00001
|
235
|
+
#define LOG_LEVEL_WARN (LOG_FLAG_ERROR | LOG_FLAG_WARN) // 0...00011
|
236
|
+
#define LOG_LEVEL_INFO (LOG_FLAG_ERROR | LOG_FLAG_WARN | LOG_FLAG_INFO) // 0...00111
|
237
|
+
#define LOG_LEVEL_DEBUG (LOG_FLAG_ERROR | LOG_FLAG_WARN | LOG_FLAG_INFO | LOG_FLAG_DEBUG) // 0...01111
|
238
|
+
#define LOG_LEVEL_VERBOSE (LOG_FLAG_ERROR | LOG_FLAG_WARN | LOG_FLAG_INFO | LOG_FLAG_DEBUG | LOG_FLAG_VERBOSE) // 0...11111
|
239
|
+
|
240
|
+
#define LOG_ERROR (LOG_LEVEL_DEF & LOG_FLAG_ERROR)
|
241
|
+
#define LOG_WARN (LOG_LEVEL_DEF & LOG_FLAG_WARN)
|
242
|
+
#define LOG_INFO (LOG_LEVEL_DEF & LOG_FLAG_INFO)
|
243
|
+
#define LOG_DEBUG (LOG_LEVEL_DEF & LOG_FLAG_DEBUG)
|
244
|
+
#define LOG_VERBOSE (LOG_LEVEL_DEF & LOG_FLAG_VERBOSE)
|
223
245
|
|
224
246
|
#define LOG_ASYNC_ENABLED YES
|
225
247
|
|
226
|
-
#define LOG_ASYNC_ERROR
|
227
|
-
#define LOG_ASYNC_WARN
|
228
|
-
#define LOG_ASYNC_INFO
|
229
|
-
#define
|
248
|
+
#define LOG_ASYNC_ERROR ( NO && LOG_ASYNC_ENABLED)
|
249
|
+
#define LOG_ASYNC_WARN (YES && LOG_ASYNC_ENABLED)
|
250
|
+
#define LOG_ASYNC_INFO (YES && LOG_ASYNC_ENABLED)
|
251
|
+
#define LOG_ASYNC_DEBUG (YES && LOG_ASYNC_ENABLED)
|
252
|
+
#define LOG_ASYNC_VERBOSE (YES && LOG_ASYNC_ENABLED)
|
230
253
|
|
231
|
-
#define DDLogError(frmt, ...) LOG_OBJC_MAYBE(LOG_ASYNC_ERROR,
|
232
|
-
#define DDLogWarn(frmt, ...) LOG_OBJC_MAYBE(LOG_ASYNC_WARN,
|
233
|
-
#define DDLogInfo(frmt, ...) LOG_OBJC_MAYBE(LOG_ASYNC_INFO,
|
234
|
-
#define
|
254
|
+
#define DDLogError(frmt, ...) LOG_OBJC_MAYBE(LOG_ASYNC_ERROR, LOG_LEVEL_DEF, LOG_FLAG_ERROR, 0, frmt, ##__VA_ARGS__)
|
255
|
+
#define DDLogWarn(frmt, ...) LOG_OBJC_MAYBE(LOG_ASYNC_WARN, LOG_LEVEL_DEF, LOG_FLAG_WARN, 0, frmt, ##__VA_ARGS__)
|
256
|
+
#define DDLogInfo(frmt, ...) LOG_OBJC_MAYBE(LOG_ASYNC_INFO, LOG_LEVEL_DEF, LOG_FLAG_INFO, 0, frmt, ##__VA_ARGS__)
|
257
|
+
#define DDLogDebug(frmt, ...) LOG_OBJC_MAYBE(LOG_ASYNC_DEBUG, LOG_LEVEL_DEF, LOG_FLAG_DEBUG, 0, frmt, ##__VA_ARGS__)
|
258
|
+
#define DDLogVerbose(frmt, ...) LOG_OBJC_MAYBE(LOG_ASYNC_VERBOSE, LOG_LEVEL_DEF, LOG_FLAG_VERBOSE, 0, frmt, ##__VA_ARGS__)
|
235
259
|
|
236
|
-
#define DDLogCError(frmt, ...) LOG_C_MAYBE(LOG_ASYNC_ERROR,
|
237
|
-
#define DDLogCWarn(frmt, ...) LOG_C_MAYBE(LOG_ASYNC_WARN,
|
238
|
-
#define DDLogCInfo(frmt, ...) LOG_C_MAYBE(LOG_ASYNC_INFO,
|
239
|
-
#define
|
260
|
+
#define DDLogCError(frmt, ...) LOG_C_MAYBE(LOG_ASYNC_ERROR, LOG_LEVEL_DEF, LOG_FLAG_ERROR, 0, frmt, ##__VA_ARGS__)
|
261
|
+
#define DDLogCWarn(frmt, ...) LOG_C_MAYBE(LOG_ASYNC_WARN, LOG_LEVEL_DEF, LOG_FLAG_WARN, 0, frmt, ##__VA_ARGS__)
|
262
|
+
#define DDLogCInfo(frmt, ...) LOG_C_MAYBE(LOG_ASYNC_INFO, LOG_LEVEL_DEF, LOG_FLAG_INFO, 0, frmt, ##__VA_ARGS__)
|
263
|
+
#define DDLogCDebug(frmt, ...) LOG_C_MAYBE(LOG_ASYNC_DEBUG, LOG_LEVEL_DEF, LOG_FLAG_DEBUG, 0, frmt, ##__VA_ARGS__)
|
264
|
+
#define DDLogCVerbose(frmt, ...) LOG_C_MAYBE(LOG_ASYNC_VERBOSE, LOG_LEVEL_DEF, LOG_FLAG_VERBOSE, 0, frmt, ##__VA_ARGS__)
|
240
265
|
|
241
266
|
/**
|
242
267
|
* The THIS_FILE macro gives you an NSString of the file name.
|
@@ -323,11 +348,19 @@ NSString *DDExtractFileNameWithoutExtension(const char *filePath, BOOL copy);
|
|
323
348
|
* you should create and add a logger.
|
324
349
|
**/
|
325
350
|
|
326
|
-
+ (void)addLogger:(id <DDLogger>)logger;
|
327
|
-
|
351
|
+
+ (void)addLogger:(id <DDLogger>)logger; // adds the logger using maximum log level (LOG_LEVEL_VERBOSE)
|
352
|
+
|
353
|
+
/**
|
354
|
+
* Please use as logLevels the LOG_LEVEL_* macros
|
355
|
+
*
|
356
|
+
**/
|
357
|
+
+ (void)addLogger:(id <DDLogger>)logger withLogLevel:(int)logLevel;
|
328
358
|
|
359
|
+
+ (void)removeLogger:(id <DDLogger>)logger;
|
329
360
|
+ (void)removeAllLoggers;
|
330
361
|
|
362
|
+
+ (NSArray *)allLoggers;
|
363
|
+
|
331
364
|
/**
|
332
365
|
* Registered Dynamic Logging
|
333
366
|
*
|
@@ -422,7 +455,7 @@ NSString *DDExtractFileNameWithoutExtension(const char *filePath, BOOL copy);
|
|
422
455
|
* For example, log messages for log files may be formatted differently than log messages for the console.
|
423
456
|
*
|
424
457
|
* For more information about formatters, see the "Custom Formatters" page:
|
425
|
-
* https://github.com/
|
458
|
+
* https://github.com/CocoaLumberjack/CocoaLumberjack/wiki/CustomFormatters
|
426
459
|
*
|
427
460
|
* The formatter may also optionally filter the log message by returning nil,
|
428
461
|
* in which case the logger will not log the message.
|
@@ -488,35 +521,35 @@ NSString *DDExtractFileNameWithoutExtension(const char *filePath, BOOL copy);
|
|
488
521
|
**/
|
489
522
|
|
490
523
|
enum {
|
491
|
-
|
492
|
-
|
524
|
+
DDLogMessageCopyFile = 1 << 0,
|
525
|
+
DDLogMessageCopyFunction = 1 << 1
|
493
526
|
};
|
494
527
|
typedef int DDLogMessageOptions;
|
495
528
|
|
496
|
-
@interface DDLogMessage : NSObject
|
529
|
+
@interface DDLogMessage : NSObject <NSCopying>
|
497
530
|
{
|
498
531
|
|
499
532
|
// The public variables below can be accessed directly (for speed).
|
500
533
|
// For example: logMessage->logLevel
|
501
|
-
|
534
|
+
|
502
535
|
@public
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
|
510
|
-
|
511
|
-
|
536
|
+
int logLevel;
|
537
|
+
int logFlag;
|
538
|
+
int logContext;
|
539
|
+
NSString *logMsg;
|
540
|
+
NSDate *timestamp;
|
541
|
+
char *file;
|
542
|
+
char *function;
|
543
|
+
int lineNumber;
|
544
|
+
mach_port_t machThreadID;
|
512
545
|
char *queueLabel;
|
513
|
-
|
514
|
-
|
515
|
-
|
516
|
-
|
517
|
-
|
518
|
-
|
519
|
-
|
546
|
+
NSString *threadName;
|
547
|
+
|
548
|
+
// For 3rd party extensions to the framework, where flags and contexts aren't enough.
|
549
|
+
id tag;
|
550
|
+
|
551
|
+
// For 3rd party extensions that manually create DDLogMessage instances.
|
552
|
+
DDLogMessageOptions options;
|
520
553
|
}
|
521
554
|
|
522
555
|
/**
|
@@ -534,15 +567,15 @@ typedef int DDLogMessageOptions;
|
|
534
567
|
* However, if you need them to be copied you may use the options parameter to specify this.
|
535
568
|
* Options is a bitmask which supports DDLogMessageCopyFile and DDLogMessageCopyFunction.
|
536
569
|
**/
|
537
|
-
- (
|
538
|
-
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
|
545
|
-
|
570
|
+
- (instancetype)initWithLogMsg:(NSString *)logMsg
|
571
|
+
level:(int)logLevel
|
572
|
+
flag:(int)logFlag
|
573
|
+
context:(int)logContext
|
574
|
+
file:(const char *)file
|
575
|
+
function:(const char *)function
|
576
|
+
line:(int)line
|
577
|
+
tag:(id)tag
|
578
|
+
options:(DDLogMessageOptions)optionsMask;
|
546
579
|
|
547
580
|
/**
|
548
581
|
* Returns the threadID as it appears in NSLog.
|
@@ -586,9 +619,9 @@ typedef int DDLogMessageOptions;
|
|
586
619
|
|
587
620
|
@interface DDAbstractLogger : NSObject <DDLogger>
|
588
621
|
{
|
589
|
-
|
590
|
-
|
591
|
-
|
622
|
+
id <DDLogFormatter> formatter;
|
623
|
+
|
624
|
+
dispatch_queue_t loggerQueue;
|
592
625
|
}
|
593
626
|
|
594
627
|
- (id <DDLogFormatter>)logFormatter;
|
@@ -0,0 +1,30 @@
|
|
1
|
+
#import <Foundation/Foundation.h>
|
2
|
+
#import "DDLog.h"
|
3
|
+
|
4
|
+
/**
|
5
|
+
* Welcome to Cocoa Lumberjack!
|
6
|
+
*
|
7
|
+
* The project page has a wealth of documentation if you have any questions.
|
8
|
+
* https://github.com/CocoaLumberjack/CocoaLumberjack
|
9
|
+
*
|
10
|
+
* If you're new to the project you may wish to read the "Getting Started" page.
|
11
|
+
* https://github.com/CocoaLumberjack/CocoaLumberjack/wiki/GettingStarted
|
12
|
+
*
|
13
|
+
*
|
14
|
+
* This formatter can be used to chain different formatters together.
|
15
|
+
* The log message will processed in the order of the formatters added.
|
16
|
+
**/
|
17
|
+
|
18
|
+
@interface DDMultiFormatter : NSObject <DDLogFormatter>
|
19
|
+
|
20
|
+
/**
|
21
|
+
* Array of chained formatters
|
22
|
+
*/
|
23
|
+
@property (readonly) NSArray *formatters;
|
24
|
+
|
25
|
+
- (void)addFormatter:(id<DDLogFormatter>)formatter;
|
26
|
+
- (void)removeFormatter:(id<DDLogFormatter>)formatter;
|
27
|
+
- (void)removeAllFormatters;
|
28
|
+
- (BOOL)isFormattingWithFormatter:(id<DDLogFormatter>)formatter;
|
29
|
+
|
30
|
+
@end
|
@@ -1,20 +1,24 @@
|
|
1
1
|
#import <Foundation/Foundation.h>
|
2
2
|
#if TARGET_OS_IPHONE
|
3
|
-
#import <UIKit/UIColor.h>
|
3
|
+
#import <UIKit/UIColor.h> // iOS
|
4
|
+
#elif !defined (COCOAPODS_POD_AVAILABLE_CocoaLumberjack_CLI)
|
5
|
+
#import <AppKit/NSColor.h> // OS X with AppKit
|
4
6
|
#else
|
5
|
-
#import
|
7
|
+
#import "CLIColor.h" // OS X without AppKit
|
6
8
|
#endif
|
7
9
|
|
8
10
|
#import "DDLog.h"
|
9
11
|
|
12
|
+
#define LOG_CONTEXT_ALL INT_MAX
|
13
|
+
|
10
14
|
/**
|
11
15
|
* Welcome to Cocoa Lumberjack!
|
12
16
|
*
|
13
17
|
* The project page has a wealth of documentation if you have any questions.
|
14
|
-
* https://github.com/
|
18
|
+
* https://github.com/CocoaLumberjack/CocoaLumberjack
|
15
19
|
*
|
16
20
|
* If you're new to the project you may wish to read the "Getting Started" wiki.
|
17
|
-
* https://github.com/
|
21
|
+
* https://github.com/CocoaLumberjack/CocoaLumberjack/wiki/GettingStarted
|
18
22
|
*
|
19
23
|
*
|
20
24
|
* This class provides a logger for Terminal output or Xcode console output,
|
@@ -33,23 +37,23 @@
|
|
33
37
|
|
34
38
|
@interface DDTTYLogger : DDAbstractLogger <DDLogger>
|
35
39
|
{
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
40
|
+
NSCalendar *calendar;
|
41
|
+
NSUInteger calendarUnitFlags;
|
42
|
+
|
43
|
+
NSString *appName;
|
44
|
+
char *app;
|
45
|
+
size_t appLen;
|
46
|
+
|
47
|
+
NSString *processID;
|
48
|
+
char *pid;
|
49
|
+
size_t pidLen;
|
50
|
+
|
51
|
+
BOOL colorsEnabled;
|
52
|
+
NSMutableArray *colorProfilesArray;
|
53
|
+
NSMutableDictionary *colorProfilesDict;
|
50
54
|
}
|
51
55
|
|
52
|
-
+ (
|
56
|
+
+ (instancetype)sharedInstance;
|
53
57
|
|
54
58
|
/* Inherited from the DDLogger protocol:
|
55
59
|
*
|
@@ -59,7 +63,7 @@
|
|
59
63
|
* or it may use its own built in formatting style.
|
60
64
|
*
|
61
65
|
* More information about formatters can be found here:
|
62
|
-
* https://github.com/
|
66
|
+
* https://github.com/CocoaLumberjack/CocoaLumberjack/wiki/CustomFormatters
|
63
67
|
*
|
64
68
|
* The actual implementation of these methods is inherited from DDAbstractLogger.
|
65
69
|
|
@@ -103,12 +107,14 @@
|
|
103
107
|
* If you run the application from a shell, then DDTTYLogger will automatically map the given color to
|
104
108
|
* the closest available color. (xterm-256color or xterm-color which have 256 and 16 supported colors respectively.)
|
105
109
|
*
|
106
|
-
* This method invokes setForegroundColor:backgroundColor:forFlag:context: and
|
110
|
+
* This method invokes setForegroundColor:backgroundColor:forFlag:context: and applies it to `LOG_CONTEXT_ALL`.
|
107
111
|
**/
|
108
112
|
#if TARGET_OS_IPHONE
|
109
113
|
- (void)setForegroundColor:(UIColor *)txtColor backgroundColor:(UIColor *)bgColor forFlag:(int)mask;
|
110
|
-
#
|
114
|
+
#elif !defined (COCOAPODS_POD_AVAILABLE_CocoaLumberjack_CLI)
|
111
115
|
- (void)setForegroundColor:(NSColor *)txtColor backgroundColor:(NSColor *)bgColor forFlag:(int)mask;
|
116
|
+
#else
|
117
|
+
- (void)setForegroundColor:(CLIColor *)txtColor backgroundColor:(CLIColor *)bgColor forFlag:(int)mask;
|
112
118
|
#endif
|
113
119
|
|
114
120
|
/**
|
@@ -117,13 +123,17 @@
|
|
117
123
|
* A logging context is often used to identify log messages coming from a 3rd party framework,
|
118
124
|
* although logging context's can be used for many different functions.
|
119
125
|
*
|
126
|
+
* Use LOG_CONTEXT_ALL to set the deafult color for all contexts that have no specific color set defined.
|
127
|
+
*
|
120
128
|
* Logging context's are explained in further detail here:
|
121
|
-
* https://github.com/
|
129
|
+
* https://github.com/CocoaLumberjack/CocoaLumberjack/wiki/CustomContext
|
122
130
|
**/
|
123
131
|
#if TARGET_OS_IPHONE
|
124
132
|
- (void)setForegroundColor:(UIColor *)txtColor backgroundColor:(UIColor *)bgColor forFlag:(int)mask context:(int)ctxt;
|
125
|
-
#
|
133
|
+
#elif !defined (COCOAPODS_POD_AVAILABLE_CocoaLumberjack_CLI)
|
126
134
|
- (void)setForegroundColor:(NSColor *)txtColor backgroundColor:(NSColor *)bgColor forFlag:(int)mask context:(int)ctxt;
|
135
|
+
#else
|
136
|
+
- (void)setForegroundColor:(CLIColor *)txtColor backgroundColor:(CLIColor *)bgColor forFlag:(int)mask context:(int)ctxt;
|
127
137
|
#endif
|
128
138
|
|
129
139
|
/**
|
@@ -140,6 +150,8 @@
|
|
140
150
|
* UIColor *purple = [UIColor colorWithRed:(64/255.0) green:(0/255.0) blue:(128/255.0) alpha:1.0];
|
141
151
|
* #else
|
142
152
|
* NSColor *purple = [NSColor colorWithCalibratedRed:(64/255.0) green:(0/255.0) blue:(128/255.0) alpha:1.0];
|
153
|
+
*
|
154
|
+
* Note: For CLI OS X projects that don't link with AppKit use CLIColor objects instead
|
143
155
|
*
|
144
156
|
* [[DDTTYLogger sharedInstance] setForegroundColor:purple backgroundColor:nil forTag:PurpleTag];
|
145
157
|
* [DDLog addLogger:[DDTTYLogger sharedInstance]];
|
@@ -150,8 +162,10 @@
|
|
150
162
|
**/
|
151
163
|
#if TARGET_OS_IPHONE
|
152
164
|
- (void)setForegroundColor:(UIColor *)txtColor backgroundColor:(UIColor *)bgColor forTag:(id <NSCopying>)tag;
|
153
|
-
#
|
165
|
+
#elif !defined (COCOAPODS_POD_AVAILABLE_CocoaLumberjack_CLI)
|
154
166
|
- (void)setForegroundColor:(NSColor *)txtColor backgroundColor:(NSColor *)bgColor forTag:(id <NSCopying>)tag;
|
167
|
+
#else
|
168
|
+
- (void)setForegroundColor:(CLIColor *)txtColor backgroundColor:(CLIColor *)bgColor forTag:(id <NSCopying>)tag;
|
155
169
|
#endif
|
156
170
|
|
157
171
|
/**
|