see this http://borkware.com/quickies/one?topic=NSString
excerpted from that page:
void LogIt (NSString *format, ...)
{
va_list args;
va_start (args, format);
NSString *string;
string = [[NSString alloc] initWithFormat: format arguments: args];
va_end (args);
printf ("%s
", [string UTF8String]);
[string release];
} // LogIt
just customize the printf to suit your needs
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…