• 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: printf
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: printf


  • Subject: Re: printf
  • From: Richard Somers <email@hidden>
  • Date: Fri, 14 Dec 2007 12:25:28 -0700

Log4Cocoa is to complex for my needs right now. I use logging for debugging, a lot. So much so that I decided that NSLog and printf just did not seem to fit my needs very well. I have a single debug replacement for NSLog for Objective-C and another one for printf for C or C++. The output is the same for both and simply "Debug (file:line) log message". Debugging control is not by level but set globally or for each file. With the clever use of the C preprocessor, macros, and a header file I can very easily and quickly turn debug logging off or on, globally for all files, or on a file by file basis. I also have indented function or method tracing which can be turned off or on the same way. Also all debug logging or debug function tracing is complied out in the release configuration.

Richard

On Dec 14, 2007, at 11:11 AM, mmalc crawford wrote:

On Dec 14, 2007, at 8:51 AM, Richard Somers wrote:

I just finished writing my own simple replacement for NSLog several days ago using printf

Any particular reason why? If you want something more sophisticated, Timothy Reaves reminded us last night about Log4Cocoa (<http://sourceforge.net/projects/log4cocoa/>)... see also Chris' comments at <http://chanson.livejournal.com/tag/logging>.

mmalc

_______________________________________________

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


References: 
 >printf (From: Roland Silver <email@hidden>)
 >Re: printf (From: "Clark Cox" <email@hidden>)
 >Re: printf (From: Richard Somers <email@hidden>)
 >Re: printf (From: mmalc crawford <email@hidden>)

  • Prev by Date: Re: -setNeedsDisplay: different between Tiger and Leopard
  • Next by Date: Access to Localized Portions of Private Framework without having App Localized
  • Previous by thread: Re: printf
  • Next by thread: Re: printf
  • Index(es):
    • Date
    • Thread