• 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: Leave NSLog()s in Final Product?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Leave NSLog()s in Final Product?


  • Subject: Re: Leave NSLog()s in Final Product?
  • From: Piers Uso Walter <email@hidden>
  • Date: Fri, 12 Mar 2004 16:20:46 +0100

On 12. Mrz 2004, at 15:26, Jerry Krinock wrote:

Is there any reason why I should not leave NSLog() calls in my final,
released product?

They don't seem to slow it down any. The advantage is that, if I ever get a
bug report from a user, I can simply have them launch it from Terminal, send
me the output, and I can probably tell where the problem is.

I personally do not much like applications filling up my console log with tons of output. This makes finding legitimate error lines much harder. For this reason, I would advise to use NSLog() just for logging of serious bugs where recovery is not possible. All other output could be encapsulated by a wrapper function that normally does nothing, but calls NSLog() when the application was started with a -debug command line switch. This would allow you to get the reports you want when your users specifically launch the application using the -debug command line switch.


Do these NSLog() calls do anything when an application is not launched from
Terminal?

They log to the system console logfile (/Library/Logs/Console/<username>/console.log), which can be viewed using /Applications/Utilities/Console.app.

With kind regards

Piers Uso Walter <email@hidden>
ilink Kommunikationssysteme GmbH
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.


  • Follow-Ups:
    • Re: Leave NSLog()s in Final Product?
      • From: Jerry Krinock <email@hidden>
    • Re: Leave NSLog()s in Final Product?
      • From: Bill Cheeseman <email@hidden>
References: 
 >Leave NSLog()s in Final Product? (From: Jerry Krinock <email@hidden>)

  • Prev by Date: Re: NSString really Unicode?
  • Next by Date: RE: Leave NSLog()s in Final Product?
  • Previous by thread: Re: Leave NSLog()s in Final Product?
  • Next by thread: Re: Leave NSLog()s in Final Product?
  • Index(es):
    • Date
    • Thread