NSLog without a new line

Is there any function that does what NSLog does, but without a newline at the end?

+7
objective-c newline nslog
source share
2 answers

see this http://borkware.com/quickies/one?topic=NSString

excerpts from this 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\n", [string cString]); [string release]; } // LogIt 

just configure printf according to your needs

+9
source share

You can use printf (), but time will not be displayed, and you cannot use the sequence "% @" for objects.

However, you can implement your own logging function using printf () and adding support for objects. You will need to know how to handle the arguments of the variable C.

+4
source share

All Articles