logts
Just a console.log()
with a (new Date()).toISOString()
timestamp.
Synopsis
console// -> 'Hello, World!' var logts = // -> '2015-05-11T02:23:49.108Z - Hello, World!'
There is also the ability to send it's output to info, error, warn and trace:
logtslogtslogtslogtslogts
Note: the timestamp is only added if the first argument to the above functions is a string. If it is not a string, then
the arguments are pass as-is to console.{log,info,error,warn,trace}
.
Author
Written by Andrew Chilton:
License
MIT - http://chilts.mit-license.org/2015/
(Ends)