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.
Files changed (296) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +2 -2
  3. data/.travis.yml +2 -0
  4. data/Gemfile +1 -0
  5. data/README.md +1 -1
  6. data/Rakefile +1 -1
  7. data/lib/motion-yapper.rb +1 -0
  8. data/lib/yapper.rb +3 -5
  9. data/lib/yapper/config.rb +2 -0
  10. data/lib/yapper/db.rb +105 -40
  11. data/lib/yapper/document.rb +7 -4
  12. data/lib/yapper/document/callbacks.rb +0 -7
  13. data/lib/yapper/document/{persistance.rb → persistence.rb} +27 -21
  14. data/lib/yapper/document/relation.rb +29 -22
  15. data/lib/yapper/document/selection.rb +122 -54
  16. data/lib/yapper/extensions.rb +12 -24
  17. data/lib/yapper/settings.rb +43 -0
  18. data/lib/yapper/timestamps.rb +2 -0
  19. data/lib/yapper/version.rb +1 -1
  20. data/{yapper.gemspec → motion-yapper.gemspec} +0 -0
  21. data/spec/integration/{where_spec.rb → criteria_spec.rb} +78 -10
  22. data/spec/integration/db_spec.rb +70 -0
  23. data/spec/integration/defaults_spec.rb +37 -0
  24. data/spec/integration/extensions_spec.rb +14 -0
  25. data/spec/integration/{persistance_spec.rb → persistence_spec.rb} +0 -0
  26. data/spec/integration/relation_spec.rb +4 -4
  27. data/vendor/Podfile.lock +9 -11
  28. data/vendor/Pods/.build/libPods-CocoaLumberjack.a +0 -0
  29. data/vendor/Pods/.build/libPods-NSData+MD5Digest.a +0 -0
  30. data/vendor/Pods/.build/libPods-YapDatabase.a +0 -0
  31. data/vendor/Pods/.build/libPods.a +0 -0
  32. data/vendor/Pods/BuildHeaders/CocoaLumberjack/DDASLLogger.h +4 -4
  33. data/vendor/Pods/BuildHeaders/CocoaLumberjack/DDAbstractDatabaseLogger.h +14 -14
  34. data/vendor/Pods/{CocoaLumberjack/Lumberjack/Extensions/ContextFilterLogFormatter.h → BuildHeaders/CocoaLumberjack/DDContextFilterLogFormatter.h} +6 -8
  35. data/vendor/Pods/BuildHeaders/CocoaLumberjack/{DispatchQueueLogFormatter.h → DDDispatchQueueLogFormatter.h} +18 -6
  36. data/vendor/Pods/BuildHeaders/CocoaLumberjack/DDFileLogger.h +67 -32
  37. data/vendor/Pods/BuildHeaders/CocoaLumberjack/DDLog+LOGV.h +99 -0
  38. data/vendor/Pods/BuildHeaders/CocoaLumberjack/DDLog.h +98 -65
  39. data/vendor/Pods/BuildHeaders/CocoaLumberjack/DDMultiFormatter.h +30 -0
  40. data/vendor/Pods/BuildHeaders/CocoaLumberjack/DDTTYLogger.h +39 -25
  41. data/vendor/Pods/BuildHeaders/YapDatabase/NSDictionary+YapDatabase.h +8 -0
  42. data/vendor/Pods/BuildHeaders/YapDatabase/YapCache.h +1 -0
  43. data/vendor/Pods/BuildHeaders/YapDatabase/YapCollectionKey.h +3 -0
  44. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabase.h +4 -4
  45. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseConnection.h +21 -19
  46. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseDefaults.h +1 -1
  47. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseExtensionPrivate.h +35 -31
  48. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseFilteredView.h +8 -35
  49. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseFilteredViewPrivate.h +0 -2
  50. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseFilteredViewTransaction.h +17 -17
  51. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseFilteredViewTypes.h +32 -0
  52. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseFullTextSearchPrivate.h +8 -0
  53. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabasePrivate.h +43 -21
  54. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseRelationship.h +35 -0
  55. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseRelationshipConnection.h +29 -0
  56. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseRelationshipEdge.h +163 -0
  57. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseRelationshipEdgePrivate.h +79 -0
  58. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseRelationshipNode.h +99 -0
  59. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseRelationshipOptions.h +59 -0
  60. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseRelationshipPrivate.h +125 -0
  61. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseRelationshipTransaction.h +384 -0
  62. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseSecondaryIndex.h +49 -0
  63. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseSecondaryIndexPrivate.h +10 -0
  64. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseSecondaryIndexSetupPrivate.h +18 -0
  65. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseTransaction.h +131 -21
  66. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseView.h +48 -107
  67. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewChange.h +2 -2
  68. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewConnection.h +1 -0
  69. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewMappings.h +17 -0
  70. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewOptions.h +10 -3
  71. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewPrivate.h +18 -1
  72. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewTransaction.h +75 -24
  73. data/vendor/Pods/BuildHeaders/YapDatabase/YapDatabaseViewTypes.h +99 -0
  74. data/vendor/Pods/CocoaLumberjack/Lumberjack/DDASLLogger.h +4 -4
  75. data/vendor/Pods/CocoaLumberjack/Lumberjack/DDASLLogger.m +51 -50
  76. data/vendor/Pods/CocoaLumberjack/Lumberjack/DDAbstractDatabaseLogger.h +14 -14
  77. data/vendor/Pods/CocoaLumberjack/Lumberjack/DDAbstractDatabaseLogger.m +546 -546
  78. data/vendor/Pods/CocoaLumberjack/Lumberjack/DDFileLogger.h +67 -32
  79. data/vendor/Pods/CocoaLumberjack/Lumberjack/DDFileLogger.m +1093 -907
  80. data/vendor/Pods/CocoaLumberjack/Lumberjack/DDLog+LOGV.h +99 -0
  81. data/vendor/Pods/CocoaLumberjack/Lumberjack/DDLog.h +98 -65
  82. data/vendor/Pods/CocoaLumberjack/Lumberjack/DDLog.m +873 -748
  83. data/vendor/Pods/CocoaLumberjack/Lumberjack/DDTTYLogger.h +39 -25
  84. data/vendor/Pods/CocoaLumberjack/Lumberjack/DDTTYLogger.m +1284 -1243
  85. data/vendor/Pods/{BuildHeaders/CocoaLumberjack/ContextFilterLogFormatter.h → CocoaLumberjack/Lumberjack/Extensions/DDContextFilterLogFormatter.h} +6 -8
  86. data/vendor/Pods/CocoaLumberjack/Lumberjack/Extensions/{ContextFilterLogFormatter.m → DDContextFilterLogFormatter.m} +70 -70
  87. data/vendor/Pods/CocoaLumberjack/Lumberjack/Extensions/{DispatchQueueLogFormatter.h → DDDispatchQueueLogFormatter.h} +18 -6
  88. data/vendor/Pods/CocoaLumberjack/Lumberjack/Extensions/DDDispatchQueueLogFormatter.m +253 -0
  89. data/vendor/Pods/CocoaLumberjack/Lumberjack/Extensions/DDMultiFormatter.h +30 -0
  90. data/vendor/Pods/CocoaLumberjack/Lumberjack/Extensions/DDMultiFormatter.m +127 -0
  91. data/vendor/Pods/CocoaLumberjack/Lumberjack/Extensions/README.txt +1 -1
  92. data/vendor/Pods/CocoaLumberjack/README.markdown +52 -15
  93. data/vendor/Pods/Headers/CocoaLumberjack/DDASLLogger.h +4 -4
  94. data/vendor/Pods/Headers/CocoaLumberjack/DDAbstractDatabaseLogger.h +14 -14
  95. data/vendor/Pods/Headers/CocoaLumberjack/{ContextFilterLogFormatter.h → DDContextFilterLogFormatter.h} +6 -8
  96. data/vendor/Pods/Headers/CocoaLumberjack/{DispatchQueueLogFormatter.h → DDDispatchQueueLogFormatter.h} +18 -6
  97. data/vendor/Pods/Headers/CocoaLumberjack/DDFileLogger.h +67 -32
  98. data/vendor/Pods/Headers/CocoaLumberjack/DDLog+LOGV.h +99 -0
  99. data/vendor/Pods/Headers/CocoaLumberjack/DDLog.h +98 -65
  100. data/vendor/Pods/Headers/CocoaLumberjack/DDMultiFormatter.h +30 -0
  101. data/vendor/Pods/Headers/CocoaLumberjack/DDTTYLogger.h +39 -25
  102. data/vendor/Pods/Headers/YapDatabase/YapCollectionKey.h +3 -0
  103. data/vendor/Pods/Headers/YapDatabase/YapDatabase.h +4 -4
  104. data/vendor/Pods/Headers/YapDatabase/YapDatabaseConnection.h +21 -19
  105. data/vendor/Pods/Headers/YapDatabase/YapDatabaseFilteredView.h +8 -35
  106. data/vendor/Pods/Headers/YapDatabase/YapDatabaseFilteredViewTransaction.h +17 -17
  107. data/vendor/Pods/Headers/YapDatabase/YapDatabaseFilteredViewTypes.h +32 -0
  108. data/vendor/Pods/Headers/YapDatabase/YapDatabaseRelationship.h +35 -0
  109. data/vendor/Pods/Headers/YapDatabase/YapDatabaseRelationshipConnection.h +29 -0
  110. data/vendor/Pods/Headers/YapDatabase/YapDatabaseRelationshipEdge.h +163 -0
  111. data/vendor/Pods/Headers/YapDatabase/YapDatabaseRelationshipNode.h +99 -0
  112. data/vendor/Pods/Headers/YapDatabase/YapDatabaseRelationshipOptions.h +59 -0
  113. data/vendor/Pods/Headers/YapDatabase/YapDatabaseRelationshipTransaction.h +384 -0
  114. data/vendor/Pods/Headers/YapDatabase/YapDatabaseSecondaryIndex.h +49 -0
  115. data/vendor/Pods/Headers/YapDatabase/YapDatabaseTransaction.h +131 -21
  116. data/vendor/Pods/Headers/YapDatabase/YapDatabaseView.h +48 -107
  117. data/vendor/Pods/Headers/YapDatabase/YapDatabaseViewChange.h +2 -2
  118. data/vendor/Pods/Headers/YapDatabase/YapDatabaseViewConnection.h +1 -0
  119. data/vendor/Pods/Headers/YapDatabase/YapDatabaseViewMappings.h +17 -0
  120. data/vendor/Pods/Headers/YapDatabase/YapDatabaseViewOptions.h +10 -3
  121. data/vendor/Pods/Headers/YapDatabase/YapDatabaseViewTransaction.h +75 -24
  122. data/vendor/Pods/Headers/YapDatabase/YapDatabaseViewTypes.h +99 -0
  123. data/vendor/Pods/Headers/____Pods-CocoaLumberjack-prefix.h +2 -0
  124. data/vendor/Pods/Headers/____Pods-environment.h +15 -15
  125. data/vendor/Pods/Manifest.lock +9 -11
  126. data/vendor/Pods/Pods-CocoaLumberjack-Private.xcconfig +1 -1
  127. data/vendor/Pods/Pods-CocoaLumberjack-prefix.pch +2 -0
  128. data/vendor/Pods/Pods-NSData+MD5Digest-Private.xcconfig +1 -1
  129. data/vendor/Pods/Pods-YapDatabase-Private.xcconfig +1 -1
  130. data/vendor/Pods/{Pods-Acknowledgements.markdown → Pods-acknowledgements.markdown} +0 -37
  131. data/vendor/Pods/{Pods-Acknowledgements.plist → Pods-acknowledgements.plist} +0 -45
  132. data/vendor/Pods/Pods-environment.h +15 -15
  133. data/vendor/Pods/Pods.xcconfig +3 -3
  134. data/vendor/Pods/Pods.xcodeproj/project.pbxproj +2426 -3155
  135. data/vendor/Pods/Pods.xcodeproj/xcuserdata/kareemk.xcuserdatad/xcschemes/Pods-CocoaLumberjack.xcscheme +59 -0
  136. data/vendor/Pods/Pods.xcodeproj/xcuserdata/kareemk.xcuserdatad/xcschemes/Pods-NSData+MD5Digest.xcscheme +59 -0
  137. data/vendor/Pods/Pods.xcodeproj/xcuserdata/kareemk.xcuserdatad/xcschemes/Pods-YapDatabase.xcscheme +59 -0
  138. data/vendor/Pods/Pods.xcodeproj/xcuserdata/kareemk.xcuserdatad/xcschemes/Pods.xcscheme +59 -0
  139. data/vendor/Pods/Pods.xcodeproj/xcuserdata/kareemk.xcuserdatad/xcschemes/xcschememanagement.plist +31 -0
  140. data/vendor/Pods/YapDatabase/README.md +3 -1
  141. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FilteredViews/Internal/YapDatabaseFilteredViewPrivate.h +0 -2
  142. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FilteredViews/YapDatabaseFilteredView.h +8 -35
  143. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FilteredViews/YapDatabaseFilteredView.m +25 -41
  144. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FilteredViews/YapDatabaseFilteredViewTransaction.h +17 -17
  145. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FilteredViews/YapDatabaseFilteredViewTransaction.m +403 -134
  146. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FilteredViews/YapDatabaseFilteredViewTypes.h +32 -0
  147. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FullTextSearch/Internal/YapDatabaseFullTextSearchPrivate.h +8 -0
  148. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FullTextSearch/YapDatabaseFullTextSearchConnection.m +8 -8
  149. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/FullTextSearch/YapDatabaseFullTextSearchTransaction.m +113 -62
  150. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Protocol/Internal/YapDatabaseExtensionPrivate.h +35 -31
  151. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Protocol/YapDatabaseExtension.m +25 -0
  152. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Protocol/YapDatabaseExtensionConnection.m +1 -1
  153. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Protocol/YapDatabaseExtensionTransaction.m +25 -1
  154. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/Internal/YapDatabaseRelationshipEdgePrivate.h +79 -0
  155. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/Internal/YapDatabaseRelationshipPrivate.h +125 -0
  156. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationship.h +35 -0
  157. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationship.m +129 -0
  158. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationshipConnection.h +29 -0
  159. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationshipConnection.m +802 -0
  160. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationshipEdge.h +163 -0
  161. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationshipEdge.m +408 -0
  162. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationshipNode.h +99 -0
  163. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationshipOptions.h +59 -0
  164. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationshipOptions.m +29 -0
  165. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationshipTransaction.h +384 -0
  166. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Relationships/YapDatabaseRelationshipTransaction.m +5254 -0
  167. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/SecondaryIndex/Internal/YapDatabaseSecondaryIndexPrivate.h +10 -0
  168. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/SecondaryIndex/Internal/YapDatabaseSecondaryIndexSetupPrivate.h +18 -0
  169. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/SecondaryIndex/YapDatabaseSecondaryIndex.h +49 -0
  170. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/SecondaryIndex/YapDatabaseSecondaryIndex.m +12 -0
  171. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/SecondaryIndex/YapDatabaseSecondaryIndexConnection.m +9 -8
  172. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/SecondaryIndex/YapDatabaseSecondaryIndexSetup.m +62 -1
  173. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/SecondaryIndex/YapDatabaseSecondaryIndexTransaction.m +148 -45
  174. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Internal/YapDatabaseViewPrivate.h +18 -1
  175. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Utilities/YapDatabaseViewChange.h +2 -2
  176. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Utilities/YapDatabaseViewChange.m +15 -9
  177. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Utilities/YapDatabaseViewMappings.h +17 -0
  178. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/Utilities/YapDatabaseViewMappings.m +211 -64
  179. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/YapDatabaseView.h +48 -107
  180. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/YapDatabaseView.m +10 -7
  181. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/YapDatabaseViewConnection.h +1 -0
  182. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/YapDatabaseViewConnection.m +13 -22
  183. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/YapDatabaseViewOptions.h +10 -3
  184. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/YapDatabaseViewTransaction.h +75 -24
  185. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/YapDatabaseViewTransaction.m +725 -244
  186. data/vendor/Pods/YapDatabase/YapDatabase/Extensions/Views/YapDatabaseViewTypes.h +99 -0
  187. data/vendor/Pods/YapDatabase/YapDatabase/Internal/NSDictionary+YapDatabase.h +8 -0
  188. data/vendor/Pods/YapDatabase/YapDatabase/Internal/NSDictionary+YapDatabase.m +19 -0
  189. data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapCache.h +1 -0
  190. data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapCache.m +12 -0
  191. data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapDatabaseDefaults.h +1 -1
  192. data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapDatabaseDefaults.m +3 -3
  193. data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapDatabasePrivate.h +43 -21
  194. data/vendor/Pods/YapDatabase/YapDatabase/Internal/YapNull.m +4 -0
  195. data/vendor/Pods/YapDatabase/YapDatabase/Utilities/YapCollectionKey.h +3 -0
  196. data/vendor/Pods/YapDatabase/YapDatabase/Utilities/YapCollectionKey.m +5 -0
  197. data/vendor/Pods/YapDatabase/YapDatabase/YapDatabase.h +4 -4
  198. data/vendor/Pods/YapDatabase/YapDatabase/YapDatabase.m +84 -93
  199. data/vendor/Pods/YapDatabase/YapDatabase/YapDatabaseConnection.h +21 -19
  200. data/vendor/Pods/YapDatabase/YapDatabase/YapDatabaseConnection.m +381 -209
  201. data/vendor/Pods/YapDatabase/YapDatabase/YapDatabaseTransaction.h +131 -21
  202. data/vendor/Pods/YapDatabase/YapDatabase/YapDatabaseTransaction.m +587 -267
  203. data/vendor/Pods/{Pods.bridgesupport → build-iPhoneSimulator/Pods.bridgesupport} +633 -2557
  204. data/vendor/Pods/build-iPhoneSimulator/libPods.a +0 -0
  205. data/vendor/YapDatabaseRubyMotion/YapDatabaseRubyMotion.bridgesupport +2 -1
  206. data/vendor/YapDatabaseRubyMotion/YapDatabaseRubyMotion.h +2 -1
  207. data/vendor/YapDatabaseRubyMotion/YapDatabaseRubyMotion.m +4 -2
  208. metadata +80 -108
  209. data/Gemfile.lock +0 -63
  210. data/lib/yapper/attachment.rb +0 -48
  211. data/lib/yapper/document/attachment.rb +0 -26
  212. data/lib/yapper/sync.rb +0 -134
  213. data/lib/yapper/sync/data.rb +0 -12
  214. data/lib/yapper/sync/event.rb +0 -194
  215. data/lib/yapper/sync/queue.rb +0 -164
  216. data/spec/integration/all_spec.rb +0 -40
  217. data/spec/integration/sync_spec.rb +0 -42
  218. data/vendor/Pods/AFNetworking/AFNetworking/AFHTTPClient.h +0 -641
  219. data/vendor/Pods/AFNetworking/AFNetworking/AFHTTPClient.m +0 -1396
  220. data/vendor/Pods/AFNetworking/AFNetworking/AFHTTPRequestOperation.h +0 -133
  221. data/vendor/Pods/AFNetworking/AFNetworking/AFHTTPRequestOperation.m +0 -327
  222. data/vendor/Pods/AFNetworking/AFNetworking/AFImageRequestOperation.h +0 -113
  223. data/vendor/Pods/AFNetworking/AFNetworking/AFImageRequestOperation.m +0 -321
  224. data/vendor/Pods/AFNetworking/AFNetworking/AFJSONRequestOperation.h +0 -71
  225. data/vendor/Pods/AFNetworking/AFNetworking/AFJSONRequestOperation.m +0 -150
  226. data/vendor/Pods/AFNetworking/AFNetworking/AFNetworkActivityIndicatorManager.h +0 -75
  227. data/vendor/Pods/AFNetworking/AFNetworking/AFNetworkActivityIndicatorManager.m +0 -157
  228. data/vendor/Pods/AFNetworking/AFNetworking/AFNetworking.h +0 -43
  229. data/vendor/Pods/AFNetworking/AFNetworking/AFPropertyListRequestOperation.h +0 -68
  230. data/vendor/Pods/AFNetworking/AFNetworking/AFPropertyListRequestOperation.m +0 -143
  231. data/vendor/Pods/AFNetworking/AFNetworking/AFURLConnectionOperation.h +0 -370
  232. data/vendor/Pods/AFNetworking/AFNetworking/AFURLConnectionOperation.m +0 -848
  233. data/vendor/Pods/AFNetworking/AFNetworking/AFXMLRequestOperation.h +0 -89
  234. data/vendor/Pods/AFNetworking/AFNetworking/AFXMLRequestOperation.m +0 -167
  235. data/vendor/Pods/AFNetworking/AFNetworking/UIImageView+AFNetworking.h +0 -78
  236. data/vendor/Pods/AFNetworking/AFNetworking/UIImageView+AFNetworking.m +0 -191
  237. data/vendor/Pods/AFNetworking/LICENSE +0 -19
  238. data/vendor/Pods/AFNetworking/README.md +0 -208
  239. data/vendor/Pods/BuildHeaders/AFNetworking/AFHTTPClient.h +0 -641
  240. data/vendor/Pods/BuildHeaders/AFNetworking/AFHTTPRequestOperation.h +0 -133
  241. data/vendor/Pods/BuildHeaders/AFNetworking/AFImageRequestOperation.h +0 -113
  242. data/vendor/Pods/BuildHeaders/AFNetworking/AFJSONRequestOperation.h +0 -71
  243. data/vendor/Pods/BuildHeaders/AFNetworking/AFNetworkActivityIndicatorManager.h +0 -75
  244. data/vendor/Pods/BuildHeaders/AFNetworking/AFNetworking.h +0 -43
  245. data/vendor/Pods/BuildHeaders/AFNetworking/AFPropertyListRequestOperation.h +0 -68
  246. data/vendor/Pods/BuildHeaders/AFNetworking/AFURLConnectionOperation.h +0 -370
  247. data/vendor/Pods/BuildHeaders/AFNetworking/AFXMLRequestOperation.h +0 -89
  248. data/vendor/Pods/BuildHeaders/AFNetworking/UIImageView+AFNetworking.h +0 -78
  249. data/vendor/Pods/BuildHeaders/Reachability/Reachability.h +0 -109
  250. data/vendor/Pods/CocoaLumberjack/Lumberjack/Extensions/DispatchQueueLogFormatter.m +0 -251
  251. data/vendor/Pods/Headers/AFNetworking/AFHTTPClient.h +0 -641
  252. data/vendor/Pods/Headers/AFNetworking/AFHTTPRequestOperation.h +0 -133
  253. data/vendor/Pods/Headers/AFNetworking/AFImageRequestOperation.h +0 -113
  254. data/vendor/Pods/Headers/AFNetworking/AFJSONRequestOperation.h +0 -71
  255. data/vendor/Pods/Headers/AFNetworking/AFNetworkActivityIndicatorManager.h +0 -75
  256. data/vendor/Pods/Headers/AFNetworking/AFNetworking.h +0 -43
  257. data/vendor/Pods/Headers/AFNetworking/AFPropertyListRequestOperation.h +0 -68
  258. data/vendor/Pods/Headers/AFNetworking/AFURLConnectionOperation.h +0 -370
  259. data/vendor/Pods/Headers/AFNetworking/AFXMLRequestOperation.h +0 -89
  260. data/vendor/Pods/Headers/AFNetworking/UIImageView+AFNetworking.h +0 -78
  261. data/vendor/Pods/Headers/Reachability/Reachability.h +0 -109
  262. data/vendor/Pods/Headers/YapDatabase/YapCache.h +0 -90
  263. data/vendor/Pods/Headers/YapDatabase/YapDatabaseConnectionState.h +0 -29
  264. data/vendor/Pods/Headers/YapDatabase/YapDatabaseDefaults.h +0 -37
  265. data/vendor/Pods/Headers/YapDatabase/YapDatabaseExtensionPrivate.h +0 -440
  266. data/vendor/Pods/Headers/YapDatabase/YapDatabaseFilteredViewPrivate.h +0 -19
  267. data/vendor/Pods/Headers/YapDatabase/YapDatabaseFullTextSearchPrivate.h +0 -69
  268. data/vendor/Pods/Headers/YapDatabase/YapDatabaseLogging.h +0 -158
  269. data/vendor/Pods/Headers/YapDatabase/YapDatabaseManager.h +0 -17
  270. data/vendor/Pods/Headers/YapDatabase/YapDatabasePrivate.h +0 -424
  271. data/vendor/Pods/Headers/YapDatabase/YapDatabaseSecondaryIndexPrivate.h +0 -73
  272. data/vendor/Pods/Headers/YapDatabase/YapDatabaseStatement.h +0 -13
  273. data/vendor/Pods/Headers/YapDatabase/YapDatabaseString.h +0 -121
  274. data/vendor/Pods/Headers/YapDatabase/YapDatabaseViewChangePrivate.h +0 -94
  275. data/vendor/Pods/Headers/YapDatabase/YapDatabaseViewMappingsPrivate.h +0 -72
  276. data/vendor/Pods/Headers/YapDatabase/YapDatabaseViewPage.h +0 -36
  277. data/vendor/Pods/Headers/YapDatabase/YapDatabaseViewPageMetadata.h +0 -27
  278. data/vendor/Pods/Headers/YapDatabase/YapDatabaseViewPrivate.h +0 -153
  279. data/vendor/Pods/Headers/YapDatabase/YapDatabaseViewRangeOptionsPrivate.h +0 -17
  280. data/vendor/Pods/Headers/YapDatabase/YapMemoryTable.h +0 -74
  281. data/vendor/Pods/Headers/YapDatabase/YapNull.h +0 -17
  282. data/vendor/Pods/Headers/YapDatabase/YapTouch.h +0 -15
  283. data/vendor/Pods/Headers/____Pods-AFNetworking-prefix.h +0 -17
  284. data/vendor/Pods/Headers/____Pods-Reachability-prefix.h +0 -5
  285. data/vendor/Pods/Pods-AFNetworking-Private.xcconfig +0 -5
  286. data/vendor/Pods/Pods-AFNetworking-dummy.m +0 -5
  287. data/vendor/Pods/Pods-AFNetworking-prefix.pch +0 -17
  288. data/vendor/Pods/Pods-AFNetworking.xcconfig +0 -1
  289. data/vendor/Pods/Pods-Reachability-Private.xcconfig +0 -5
  290. data/vendor/Pods/Pods-Reachability-dummy.m +0 -5
  291. data/vendor/Pods/Pods-Reachability-prefix.pch +0 -5
  292. data/vendor/Pods/Pods-Reachability.xcconfig +0 -1
  293. data/vendor/Pods/Reachability/LICENCE.txt +0 -24
  294. data/vendor/Pods/Reachability/README.md +0 -65
  295. data/vendor/Pods/Reachability/Reachability.h +0 -109
  296. 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/robbiehanson/CocoaLumberjack
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/robbiehanson/CocoaLumberjack/wiki/GettingStarted
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/robbiehanson/CocoaLumberjack/wiki/CustomLogLevels
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/robbiehanson/CocoaLumberjack/wiki/FineGrainedLogging
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/robbiehanson/CocoaLumberjack/wiki/CustomLogLevels
224
+ * https://github.com/CocoaLumberjack/CocoaLumberjack/wiki/CustomLogLevels
206
225
  **/
207
226
 
208
- #define LOG_FLAG_ERROR (1 << 0) // 0...0001
209
- #define LOG_FLAG_WARN (1 << 1) // 0...0010
210
- #define LOG_FLAG_INFO (1 << 2) // 0...0100
211
- #define LOG_FLAG_VERBOSE (1 << 3) // 0...1000
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) // 0...0001
215
- #define LOG_LEVEL_WARN (LOG_FLAG_ERROR | LOG_FLAG_WARN) // 0...0011
216
- #define LOG_LEVEL_INFO (LOG_FLAG_ERROR | LOG_FLAG_WARN | LOG_FLAG_INFO) // 0...0111
217
- #define LOG_LEVEL_VERBOSE (LOG_FLAG_ERROR | LOG_FLAG_WARN | LOG_FLAG_INFO | LOG_FLAG_VERBOSE) // 0...1111
218
-
219
- #define LOG_ERROR (ddLogLevel & LOG_FLAG_ERROR)
220
- #define LOG_WARN (ddLogLevel & LOG_FLAG_WARN)
221
- #define LOG_INFO (ddLogLevel & LOG_FLAG_INFO)
222
- #define LOG_VERBOSE (ddLogLevel & LOG_FLAG_VERBOSE)
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 ( NO && LOG_ASYNC_ENABLED)
227
- #define LOG_ASYNC_WARN (YES && LOG_ASYNC_ENABLED)
228
- #define LOG_ASYNC_INFO (YES && LOG_ASYNC_ENABLED)
229
- #define LOG_ASYNC_VERBOSE (YES && LOG_ASYNC_ENABLED)
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, ddLogLevel, LOG_FLAG_ERROR, 0, frmt, ##__VA_ARGS__)
232
- #define DDLogWarn(frmt, ...) LOG_OBJC_MAYBE(LOG_ASYNC_WARN, ddLogLevel, LOG_FLAG_WARN, 0, frmt, ##__VA_ARGS__)
233
- #define DDLogInfo(frmt, ...) LOG_OBJC_MAYBE(LOG_ASYNC_INFO, ddLogLevel, LOG_FLAG_INFO, 0, frmt, ##__VA_ARGS__)
234
- #define DDLogVerbose(frmt, ...) LOG_OBJC_MAYBE(LOG_ASYNC_VERBOSE, ddLogLevel, LOG_FLAG_VERBOSE, 0, frmt, ##__VA_ARGS__)
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, ddLogLevel, LOG_FLAG_ERROR, 0, frmt, ##__VA_ARGS__)
237
- #define DDLogCWarn(frmt, ...) LOG_C_MAYBE(LOG_ASYNC_WARN, ddLogLevel, LOG_FLAG_WARN, 0, frmt, ##__VA_ARGS__)
238
- #define DDLogCInfo(frmt, ...) LOG_C_MAYBE(LOG_ASYNC_INFO, ddLogLevel, LOG_FLAG_INFO, 0, frmt, ##__VA_ARGS__)
239
- #define DDLogCVerbose(frmt, ...) LOG_C_MAYBE(LOG_ASYNC_VERBOSE, ddLogLevel, LOG_FLAG_VERBOSE, 0, frmt, ##__VA_ARGS__)
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
- + (void)removeLogger:(id <DDLogger>)logger;
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/robbiehanson/CocoaLumberjack/wiki/CustomFormatters
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
- DDLogMessageCopyFile = 1 << 0,
492
- DDLogMessageCopyFunction = 1 << 1
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
- int logLevel;
504
- int logFlag;
505
- int logContext;
506
- NSString *logMsg;
507
- NSDate *timestamp;
508
- char *file;
509
- char *function;
510
- int lineNumber;
511
- mach_port_t machThreadID;
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
- NSString *threadName;
514
-
515
- // For 3rd party extensions to the framework, where flags and contexts aren't enough.
516
- id tag;
517
-
518
- // For 3rd party extensions that manually create DDLogMessage instances.
519
- DDLogMessageOptions options;
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
- - (id)initWithLogMsg:(NSString *)logMsg
538
- level:(int)logLevel
539
- flag:(int)logFlag
540
- context:(int)logContext
541
- file:(const char *)file
542
- function:(const char *)function
543
- line:(int)line
544
- tag:(id)tag
545
- options:(DDLogMessageOptions)optionsMask;
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
- id <DDLogFormatter> formatter;
590
-
591
- dispatch_queue_t loggerQueue;
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 <AppKit/NSColor.h>
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/robbiehanson/CocoaLumberjack
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/robbiehanson/CocoaLumberjack/wiki/GettingStarted
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
- NSCalendar *calendar;
37
- NSUInteger calendarUnitFlags;
38
-
39
- NSString *appName;
40
- char *app;
41
- size_t appLen;
42
-
43
- NSString *processID;
44
- char *pid;
45
- size_t pidLen;
46
-
47
- BOOL colorsEnabled;
48
- NSMutableArray *colorProfilesArray;
49
- NSMutableDictionary *colorProfilesDict;
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
- + (DDTTYLogger *)sharedInstance;
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/robbiehanson/CocoaLumberjack/wiki/CustomFormatters
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 passes the default context (0).
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
- #else
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/robbiehanson/CocoaLumberjack/wiki/CustomContext
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
- #else
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
- #else
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
  /**