Skip to content

Instantly share code, notes, and snippets.

@rattrayalex
Created December 13, 2013 01:37
Show Gist options
  • Save rattrayalex/7938649 to your computer and use it in GitHub Desktop.
Save rattrayalex/7938649 to your computer and use it in GitHub Desktop.
# alex's logging function that he likes to use.
l = (message, objs...) ->
now = new Date()
hours = now.getHours()
mins = now.getMinutes()
secs = now.getSeconds()
console.log(["#{ hours }:#{ mins }.#{ secs }", message, objs...])
return
# usage:
l 'thing1', thing1, 'thing2', thing2
# output:
["20:37.21", "thing1", Object, "thing2", Array[7]]
0: "20:37.21"
1: "thing1"
2: Object
cow: "moo"
__proto__: Object
3: "thing2"
4: Array[7]
0: 1
1: 2
2: 3
3: 4
4: "cow"
5: "moo"
6: "bark"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment