Skip to content

Instantly share code, notes, and snippets.

@samuelbeek
Last active August 29, 2015 14:24
Show Gist options
  • Save samuelbeek/bf843ae26cde2140dbda to your computer and use it in GitHub Desktop.
Save samuelbeek/bf843ae26cde2140dbda to your computer and use it in GitHub Desktop.
Amazing logging in swift.
//
// LogHelper.swift
//
// Created by Samuel Beek on 24/06/15.
// Copyright (c) 2015 Samuel Beek. All rights reserved.
// http://twitter.com/samuelbeek
/// Logs objects
func log<T>(object: T) {
println(object)
}
/// Logs an array of objects in one line.
func log(values: [Any]){
for value in values {
print(value)
print(" ") // space after each value
}
println()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment