Skip to content

Instantly share code, notes, and snippets.

@iAladdin
Created October 8, 2017 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iAladdin/4bc35a70464fe3cff67164ada6aef252 to your computer and use it in GitHub Desktop.
Save iAladdin/4bc35a70464fe3cff67164ada6aef252 to your computer and use it in GitHub Desktop.
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