• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: overwrite NSLog
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: overwrite NSLog


  • Subject: Re: overwrite NSLog
  • From: Shaun Wexler <email@hidden>
  • Date: Sun, 6 Feb 2005 16:16:08 -0800

On Feb 6, 2005, at 3:46 PM, Gwynne wrote:

Is there a way to overwrite NSLog/description so that it does not print all the additional information it usually comes with? I don't mean overwriting it for a particular class, but generally, so that even in main in a FoundationTool I could use it and get behavior more like printf (but able to handle Unicode).

NSLog( @"%@\n", someObject );

is roughly the same as

printf( "%s\n", [[someObject description] UTF8String] );

except that the printf() will not print the datetime, process name, or pid.

fprintf(stderr, "%s\n", [[someObject description] UTF8String]); -- Shaun Wexler MacFOH http://www.macfoh.com

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >overwrite NSLog (From: Daniel Child <email@hidden>)
 >Re: overwrite NSLog (From: Gwynne <email@hidden>)

  • Prev by Date: Re: overwrite NSLog
  • Next by Date: Re: NSSearchField crash
  • Previous by thread: Re: overwrite NSLog
  • Next by thread: Re: CFDateFormatter + time zone = failure or crash
  • Index(es):
    • Date
    • Thread