title: Best Practices for Error Logging and/or reporting for iPhone
body: <p>When I do web development, I use a custom made logger that catches fatal errors and appends a trace to a file and displays a message to the user.  I can occasionally glance to see if the file changed, which means, some user encountered an error and I can dig in to see what they encountered. </p>
  
  <p>I'd like something similar on the iphone, with some caveats:</p>
  
  <ul>
  <li>While developing, it should be trivial to reset the list of errors or turn off notification.</li>
  <li>While developing, the error messages should also show up in some obvious place, like on the screen on in the console</li>
  <li>Once deployed, errors should politely be sent to the mothership for analysis (for a bug fix in the next update)</li>
  <li>Turn on Trace/Info logging when trying to track down a problem during development</li>
  <li>Turn off console logging for 'Release' to speed up things for the user</li>
  <li>Should clean-up after itself so as to be a good citizen on the phone</li>
  </ul>
  
  <h2>Some Related Links</h2>
  
  <ul>
  <li><a href="http://blogs.oreilly.com/iphone/2008/02/gslog-another-way-to-log.html" rel="nofollow noreferrer">Using GSLog for instead of NSLog</a> </li>
  <li><a href="https://stackoverflow.com/questions/202299/logging-to-a-file-on-the-iphone">logging to a file on the iphone</a></li>
  <li>On the Mac, people say Apple System Logger and GTM Logger are the way to go <a href="https://stackoverflow.com/questions/1480363/objective-c-logging-best-practices">objective-c logging best practices</a></li>
  <li><a href="https://blog.codinghorror.com/the-problem-with-logging/" rel="nofollow noreferrer">Jeff A's Blog entry on logging</a></li>
  </ul>
  
  <p>It seem like there would be a common toolkit to do this - how do you handle this?</p>
  
  <p>[Update Oct 2011]
  There have been some developments, of varying maturity...</p>
  
  <ul>
  <li><a href="https://www.plcrashreporter.org" rel="nofollow noreferrer">PLCrashReporter</a>.</li>
  <li><a href="http://quincykit.net/" rel="nofollow noreferrer">Quincy</a> sits on top of PLC.</li>
  <li><a href="http://www.bugsense.com" rel="nofollow noreferrer">Bugsense</a> commercial crash reporter.</li>
  <li><a href="http://www.crittercism.com" rel="nofollow noreferrer">Crittercism</a> crash and error reporting (some free packages, some paid).</li>
  <li><a href="http://testflight.app" rel="nofollow noreferrer">Test flight</a> now has an SDK that catches crashes (but not yet for app store apps, just dev apps).</li>
  <li>Like Test Flight, <a href="http://www.hockeyapp.net/" rel="nofollow noreferrer">Hockey</a> aims to combine ad hoc distribution with crash reporting.</li>
  </ul>