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 (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to