Skip to content

Instantly share code, notes, and snippets.

@olxios olxios/DebugPrint.swift
Last active Sep 8, 2017

What would you like to do?
How to use NSLog and print only for debugging?
/// Writes the textual representations of `items` most suitable for
/// debugging, separated by `separator` and terminated by
/// `terminator`, into the standard output.
/// The textual representations are obtained for each `item` via
/// the expression `String(reflecting: item)`.
/// - Note: To print without a trailing newline, pass `terminator: ""`
/// - SeeAlso: `print`, `Streamable`, `CustomStringConvertible`,
/// `CustomDebugStringConvertible`
public func debugPrint(items: Any..., separator: String = default, terminator: String = default)
// Swift 3
import Foundation
func releasePrint(_ object: Any) {
func print(_ object: Any) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.