Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

MacMan988

macrumors 6502a
Original poster
Jul 7, 2012
893
176
I have seen that there are many third-party logging libraries out there. What are the pros (apart from color coding) of using them over simple print("") or NSLog outputs? And what are some most popular libraries to use for logging purpose?
 
Well, some are faster than NSLog, but I like them for the ability to tweak the various levels of output to the appropriate audience as well as build log files for export when unexpected issues arise (crashes automatically upload them to my analytics). I'll collect all the noise from my testers and only errors from my general users, often with some sort of toggle to enable in-depth logging, that can be submitted through the app when other issues arise and they reach out to me.

Apple also has introduced a new logging framework within iOS, in iOS 10, called os_log and they suggest using that but I have yet to get the opportunity.. it very well could be garbage and the reason iOS vomits all over the debugger now.
 
Last edited:
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.