Created
February 12, 2015 02:40
-
-
Save JasonMillward/55a72f6fd4c16355b6b6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var debug = true; | |
function log(str) { | |
if (debug) { | |
var currentTime, h, m, s; | |
currentTime = new Date; | |
h = currentTime.getHours(); | |
m = currentTime.getMinutes(); | |
s = currentTime.getSeconds(); | |
try { | |
console.log("[" + h + ":" + m + ":" + s + "] " + str); | |
} catch (e) {} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment