Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to NSLog() without the time and date stamps, and the automatic newline? [duplicate]

Tags:

Does NSLog() have variants that print without the time and date stamps, and the automatic newline?

Thanks. Now with following code, I can print NSString, cString, or objects:

#import <Foundation/Foundation.h> #import <stdio.h>  int main (int argc, const char * argv[]) {   NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];    NSString *s = @"Hello, World!";   NSDate *today = [NSDate date];    NSLog(@"%@", s);   printf("%s at %s", [s UTF8String], [[today description] UTF8String]);    [pool drain];   return 0; }   
like image 657
Stephen Hsu Avatar asked Aug 15 '10 11:08

Stephen Hsu


1 Answers

Use printf() instead of NSLog()

like image 108
NebulaFox Avatar answered Nov 03 '22 02:11

NebulaFox