In this final wrap of my MyLogger class, I’ll show you my experience and usages. As most Objective-C developers know, NSLog is a C function to print out messages. It is very useful, however, as it is a function, where parameters limit its usage. It possible to pass complicated parameters, however, that’ may be too difficult or just impossible. In case if you want to define different storage or format for logging message, class is the way to go. That’s my initial intension to define a wrapper class for NSLog: MyLogger.
July 19, 2010
MyLogger Class in Objective-C (4)
July 17, 2010
MyLogger Class in Objective-C (3)
In my previous log, I have discussed the class level methods and some of instance methods, which as overwrites of NSObject. MyLogger class has a list of instance methods, most of them in similar structure. Those methods are defined mainly to provide convenience APIs for usage.