{"id":7622,"date":"2015-09-22T13:41:54","date_gmt":"2015-09-22T13:41:54","guid":{"rendered":"https:\/\/unknownerror.org\/index.php\/2015\/09\/22\/cocoalumberjack-cocoalumberjack\/"},"modified":"2015-09-22T13:41:54","modified_gmt":"2015-09-22T13:41:54","slug":"cocoalumberjack-cocoalumberjack","status":"publish","type":"post","link":"https:\/\/unknownerror.org\/index.php\/2015\/09\/22\/cocoalumberjack-cocoalumberjack\/","title":{"rendered":"CocoaLumberjack\/CocoaLumberjack"},"content":{"rendered":"<p><img decoding=\"async\" src=\"http:\/\/unknownerror.org\/opensource\/CocoaLumberjack\/CocoaLumberjack\/LumberjackLogo.png\" \/><\/p>\n<p><img decoding=\"async\" src=\"http:\/\/img.shields.io\/travis\/CocoaLumberjack\/CocoaLumberjack\/master.svg?style=flat\" \/> <img decoding=\"async\" src=\"http:\/\/img.shields.io\/cocoapods\/v\/CocoaLumberjack.svg?style=flat\" \/> <img decoding=\"async\" src=\"http:\/\/img.shields.io\/cocoapods\/p\/CocoaLumberjack.svg?style=flat\" \/> <img decoding=\"async\" src=\"http:\/\/img.shields.io\/cocoapods\/l\/CocoaLumberjack.svg?style=flat\" \/> <img decoding=\"async\" src=\"http:\/\/www.versioneye.com\/objective-c\/cocoalumberjack\/reference_badge.svg?style=flat\" \/><\/p>\n<p><strong>CocoaLumberjack<\/strong> is a fast &amp; simple, yet powerful &amp; flexible logging framework for Mac and iOS.<\/p>\n<h3>How to get started<\/h3>\n<pre><code>platform :ios, '5.0'\npod 'CocoaLumberjack'\n<\/code><\/pre>\n<h3>CocoaLumberjack 2<\/h3>\n<h4>Migrating to 2.x<\/h4>\n<ul>\n<li>Replace <code>DDLog.h<\/code> imports by <code>#import<\/code> .<\/li>\n<li>Using <code>ddLogLevel<\/code> to start using the library is now optional. If you define it add <code>#define LOG_LEVEL_DEF ddLogLevel<\/code> before <code>#import<\/code> and make change its type to <code>DDLogLevel<\/code><\/li>\n<\/ul>\n<p>Advanced users, third party libraries:<\/p>\n<ul>\n<li>Replace all <code>DDLogC<\/code> macros for regular <code>DDLog<\/code> macros.<\/li>\n<li>Replace log level (<code>LOG_LEVEL_*<\/code>) macros with <code>DDLogLevel<\/code> enum values<\/li>\n<li>Replace log flag (<code>LOG_FLAG_*<\/code>) macros with <code>DDLogFlag<\/code> enum values<\/li>\n<li>Replace <code>DDLogMessage<\/code> ivars and method calls to the new ivars and methods\n<ul>\n<li><code>logMsg<\/code> with <code>_message<\/code><\/li>\n<li><code>logLevel<\/code> with <code>_level<\/code><\/li>\n<li><code>logFlag<\/code> with <code>_flag<\/code><\/li>\n<li><code>logContext<\/code> with <code>_context<\/code><\/li>\n<li><code>lineNumber<\/code> with <code>_line<\/code> (type changed from <code>int<\/code> to <code>NSUInteger<\/code>)<\/li>\n<li><code>file<\/code> with <code>_file<\/code> (<code>filename<\/code> contains just the file name, without the extension and the full path)<\/li>\n<li><code>timestamp<\/code> with <code>_timestamp<\/code><\/li>\n<li><code>methodName<\/code> with <code>function<\/code><\/li>\n<\/ul>\n<\/li>\n<li>Replace <code>DDAbstractLogger<\/code> <code>formatter<\/code> to <code>logFormatter<\/code><\/li>\n<li><code>YSSingleFileLogger<\/code> ivars are no longer accesible, use the methods instead<\/li>\n<li>Replace <code>[DDLog addLogger:withLogLevel:]<\/code> with <code>[DDLog addLogger:withLevel:]<\/code><\/li>\n<\/ul>\n<h4>Forcing 1.x<\/h4>\n<p>If an included library requires it, you can force CocoaLumberjack 1.x by setting the version before the conflicting library:<\/p>\n<pre><code>pod 'CocoaLumberjack', '~&gt; 1.9'\npod 'ConflictingLibrary'\n<\/code><\/pre>\n<h3>Features<\/h3>\n<h4>Lumberjack is Fast &amp; Simple, yet Powerful &amp; Flexible.<\/h4>\n<p>It is similar in concept to other popular logging frameworks such as log4j, yet is designed specifically for Objective-C, and takes advantage of features such as multi-threading, grand central dispatch (if available), lockless atomic operations, and the dynamic nature of the Objective-C runtime.<\/p>\n<h4>Lumberjack is Fast<\/h4>\n<p>In most cases it is an order of magnitude faster than NSLog.<\/p>\n<h4>Lumberjack is Simple<\/h4>\n<p>It takes as little as a single line of code to configure lumberjack when your application launches. Then simply replace your NSLog statements with DDLog statements and that\u2019s about it. (And the DDLog macros have the exact same format and syntax as NSLog, so it\u2019s super easy.)<\/p>\n<h4>Lumberjack is Powerful:<\/h4>\n<p>One log statement can be sent to multiple loggers, meaning you can log to a file and the console simultaneously. Want more? Create your own loggers (it\u2019s easy) and send your log statements over the network. Or to a database or distributed file system. The sky is the limit.<\/p>\n<h4>Lumberjack is Flexible:<\/h4>\n<p>Configure your logging however you want. Change log levels per file (perfect for debugging). Change log levels per logger (verbose console, but concise log file). Change log levels per xcode configuration (verbose debug, but concise release). Have your log statements compiled out of the release build. Customize the number of log levels for your application. Add your own fine-grained logging. Dynamically change log levels during runtime. Choose how &amp; when you want your log files to be rolled. Upload your log files to a central server. Compress archived log files to save disk space\u2026<\/p>\n<h3>This framework is for you if:<\/h3>\n<ul>\n<li>You\u2019re looking for a way to track down that impossible-to-reproduce bug that keeps popping up in the field.<\/li>\n<li>You\u2019re frustrated with the super short console log on the iPhone.<\/li>\n<li>You\u2019re looking to take your application to the next level in terms of support and stability.<\/li>\n<li>You\u2019re looking for an enterprise level logging solution for your application (Mac or iPhone).<\/li>\n<\/ul>\n<h3>Documentation<\/h3>\n<h3>Requirements<\/h3>\n<ul>\n<li>Xcode 4.4 or later is required<\/li>\n<li>iOS 5 or later<\/li>\n<li>OS X 10.7 or later<\/li>\n<li>for OS X &lt; 10.7 support, use the 1.6.0 version<\/li>\n<\/ul>\n<h3>Author<\/h3>\n<ul>\n<li>Robbie Hanson<\/li>\n<li>Love the project? Wanna buy me a coffee? (or a beer :D) <img decoding=\"async\" src=\"http:\/\/www.paypal.com\/en_US\/i\/btn\/btn_donate_SM.gif\" \/><\/li>\n<\/ul>\n<h3>Collaborators<\/h3>\n<ul>\n<li>Ernesto Rivera<\/li>\n<li>Dmitry Vorobyov<\/li>\n<li>Bogdan Poplauschi<\/li>\n<\/ul>\n<h3>License<\/h3>\n<ul>\n<li>CocoaLumberjack is available under the BSD license. See the LICENSE file.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>CocoaLumberjack is a fast &amp; simple, yet powerful &amp; flexible logging framework for Mac and iOS. How to get started platform :ios, &#8216;5.0&#8217; pod &#8216;CocoaLumberjack&#8217; CocoaLumberjack 2 Migrating to 2.x Replace DDLog.h imports by #import . Using ddLogLevel to start using the library is now optional. If you define it add #define LOG_LEVEL_DEF ddLogLevel before [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-7622","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7622","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/comments?post=7622"}],"version-history":[{"count":0,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/posts\/7622\/revisions"}],"wp:attachment":[{"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/media?parent=7622"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/categories?post=7622"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/unknownerror.org\/index.php\/wp-json\/wp\/v2\/tags?post=7622"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}