title: Disabling NSLog For Production In Swift Project
body: <p>So this answer <a href="https://stackoverflow.com/questions/2025471/do-i-need-to-disable-nslog-before-release-application">Do I need to disable NSLog before release Application?</a> gives a great way to disable NSLog in a production environment, but unfortunately, this solution does not seem to work for Swift projects. My approach was to place the following code in the bridging header .h file that I am using for some pods in my project.</p>
  
  <pre><code>#ifdef DEBUG
      #define DLog(...) NSLog(@"%s %@", __PRETTY_FUNCTION__, [NSString stringWithFormat:__VA_ARGS__])
  #else
      #define DLog(...) do { } while (0)
  #endif
  </code></pre>
  
  <p>However, using DLog in Swift code is causing the compiler to state that they are unrecongnized symbols. Is there somewhere else I should be placing this <code>#ifdef</code> or is there a different solution for Swift project in general?</p>