util-log-timestamp
An enhanced version of log-timestamp, which provides support for util too.
Prepend timestamps to functions like console.log, console.warn, util.puts, util.warn, util.log etc
Example
var util = ;util;util;util;util;console;console;console;console;util;util;util;util;console;console;console;console;
yields
Before util puts-timestamp
Befor util error-timestamp
Befor util print-timestamp26 Dec 13:50:27 - Befor util log-timestamp
Before console puts-timestamp
Before console error-timestamp
Before console print-timestamp
Before console log-timestamp
[2013-12-26T08:20:27.357Z] After util puts-timestamp
[2013-12-26T08:20:27.357Z] After util error-timestamp
[2013-12-26T08:20:27.358Z] After util log-timestamp[2013-12-26T08:20:27.358Z] After util print-timestamp[2013-12-26T08:20:27.358Z] After console puts-timestamp
[2013-12-26T08:20:27.358Z] After console error-timestamp
[2013-12-26T08:20:27.358Z] After console print-timestamp
[2013-12-26T08:20:27.358Z] After console log-timestamp
You can specify a custom function as well
{ return 'date="' + Date + '" message="%s"' };console;
yields
date="2012-08-23T20:08:37.000Z" message="hello world"
Install
npm install util-log-timestamp
License
MIT License