Search code examples
iphoneiosloggingnslog

is there a popular open source NSLog replacement that handles enabling only in DEBUG and different log levels?


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.


Solution

  • 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.