I\'m developing a static library that will be distributed to other developers, who may need debug statements. So I have several levels of logging.
In order to avoid
NSString *fullString = [[[NSString alloc] initWithFormat:format arguments:args] autorelease];
There is a method for that ;)
Although I suggest not to use functions, but some simple macro definitions:
#define myLogLevel1(format, ...) myLog(1, format, __VA_ARGS__)
#define myLogLevel2(format, ...) myLog(2, format, __VA_ARGS__)