Re: NSLog() without the timestamp?
Re: NSLog() without the timestamp?
- Subject: Re: NSLog() without the timestamp?
- From: Jens Alfke <email@hidden>
- Date: Tue, 09 Aug 2011 09:53:42 -0700
On Aug 9, 2011, at 9:30 AM, William Squires wrote:
> Is there a function like NSLog() that doesn't print the timestamp (and other crap) and doesn't automatically append a '\n' at the end? If not, what would be the best way to implement such a function. Trouble is, printf() doesn't understand the %@ specifier, so that approach would be a PITA.
fputs(stderr, [[NSString stringWithFormat: @“The count is %u”, count] UTF8String]);
Wrap that in a function if you don’t want to type it every time :)
(Even if you go with something else, make sure it writes to stderr not stout. Stdout gets buffered, so it’s much less useful for logging.)
—Jens
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden