Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Swift 4 - PrettyPrint
//
// PrettyPrint.swift
//
// Created by Aladdin on 08/10/2017.
// Copyright © 2017 Aladdin. All rights reserved.
//
import Foundation
public func prettyprint<T>(_ object: T, _ file: String = #file, _ function: String = #function, _ line: Int = #line) {
Swift.print("\(file.lastPathComponent):\(line) - \(function) | \(object)")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment