3

Is there a well known / popular NSLog replacement/approach that many iPhone developers are using?

That is one that handles ensuring debug type logging only appears in debug states (macros etc), and support for different log levels (DEBUG, WARN, INFO, ERROR etc)?

I understand there may not be loads of work in implementing this but am curious to know if there is popular download a lot of iPhone developers are using that already solves this.

Greg
  • 34,042
  • 79
  • 253
  • 454
  • I'd be curious as to what kind of feature and developments could justify having an open-source logging solution for iPhone apps. – zneak Mar 16 '11 at 02:20

3 Answers3

4

I use Marcus Zarra's prefix.pch. it used to be at http://www.cimgf.com/2010/05/02/my-current-prefix-pch-file/ but the website is down now, was copied to this gist

It doesn't have as many levels as you want, but it gives you enough of an idea of how you would do it.

Edoardo
  • 4,485
  • 1
  • 27
  • 31
benwong
  • 2,226
  • 1
  • 16
  • 14
  • looks good - not sure how to configure the DEBUG flag however - posted a question here re it http://stackoverflow.com/questions/5321731/how-do-i-specify-the-debug-definition-in-the-project-build-settings – Greg Mar 16 '11 at 06:19
3

CocoaLumberjack is a simple yet powerful logging utility. With a few lines of code you can send all your log statements to the console or a file, or both. Or even to a database.

Plus it's fully customizable. For example, you can customize how many levels there are.

https://github.com/CocoaLumberjack/CocoaLumberjack

Cœur
  • 37,241
  • 25
  • 195
  • 267
Robbie Hanson
  • 3,259
  • 1
  • 21
  • 16
0

https://github.com/CocoaLumberjack/CocoaLumberjack

seems active even now (May 2011).

Cœur
  • 37,241
  • 25
  • 195
  • 267
Dan Rosenstark
  • 68,471
  • 58
  • 283
  • 421