Last active
October 13, 2015 23:38
-
-
Save bryanbuchanan/4274165 to your computer and use it in GitHub Desktop.
Wrapper for console.log command
This file contains 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
// Logger only works when develop == true | |
var develop = true; | |
function log(message, line) { | |
if (window.console && window.log && develop) { | |
var line = typeof line !== "undefined" ? line : false; | |
if (line) { | |
if (typeof message === "string") { | |
console.log(message + " (Line " + line + ")"); | |
} else { | |
console.log("Line " + line + ":"); | |
console.log(message); | |
} | |
} else { | |
console.log(message); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment