0

This post suggests that NSLog in production is a really bad idea. I'm trying to understand why. Here are some of my theories.

  1. NSLog, logs only on the main_thread (UI Thread) hence even logging from other threads is a bad idea (A thread switch is involved).
  2. NSLog, writes to a output stream, blocking the process entirely.

Can anyone tell me what other theories exist? Or if someone knows the exact solution.

Community
  • 1
  • 1
Dunes Buggy
  • 1,779
  • 1
  • 21
  • 41

1 Answers1

0

It's also a security liability. You don't want to expose details about payment transactions, balances..credit card numbers..or anything else that you are legal bound (by your clients) to not disclose.

Earl Grey
  • 7,426
  • 6
  • 39
  • 59
  • 2
    In that case the advice would be "Don't NSLog sensitive data", not "Avoid NSLog in production" – JustSid Mar 03 '15 at 23:06
  • You do not base your app's security (and legality) on human factor. Ever. Why? because this will fail extremely quickly either for negligence, honest error, or sabotage. – Earl Grey Mar 03 '15 at 23:09