title: How do I expose a Swift global function to Objective-C?
body: <p>I have created a debug version of the Swift print command called <code>debugPrint()</code> that takes a few extra parameters that let my apps filter their console output at runtime based (e.g. turn on <code>init</code> &amp; <code>deinit</code> print statements from a given module while debugging something, then turn it back off.)</p>
  
  <p>The app I'm working on contains a fair amount of legacy Objective-C code, so I'd like to be able to use an Objective-C interface to the same debug print function.</p>
  
  <p>I want to expose an Objective-C version, probably called <code>dLog</code>, to correspond with <code>NSLog</code>, that does the same thing for Objective-C.</p>
  
  <p>However, I can't figure out how to expose a Swift global function to Objective-C. It's straightforward to expose <code>@objc</code> swift classes, along with their static methods and instance methods, but this will be an app-wide global function, not specific to any particular class.</p>