/* Log statements with `log` and `console.log` should appear the same, and show the correct line numbers */ function Test() {} Test.prototype.extraMethod = function() { } Test.methodAttachedToFunction = function(withParam) { } function logAllWithWrapper() { log("A single string"); log(123); log(["An", "Array", "Of", "Strings"]); log("The %s jumped over %d tall buildings", "person", 100); log("The", "person", "jumped over ", 100, " tall buildings"); log("The object %o is inspectable!", { person: { jumpedOver: [100, "tall buildings"]}}); log('%cThis is red text on a green background', 'color:red; background-color:green'); log({ an: "obj", withNested: { objects: { inside: "of", it: true }}}); log(Test, Test.methodAttachedToFunction); log(new Test()); log(document); log(document.body); log(document.body.childNode); } function logAllWithNative() { console.log("A single string"); console.log(123); console.log(["An", "Array", "Of", "Strings"]); console.log("The %s jumped over %d tall buildings", "person", 100); console.log("The", "person", "jumped over ", 100, " tall buildings"); console.log("The object %o is inspectable!", { person: { jumpedOver: [100, "tall buildings"]}}); console.log('%cThis is red text on a green background', 'color:red; background-color:green'); console.log({ an: "obj", withNested: { objects: { inside: "of", it: true }}}); console.log(Test, Test.methodAttachedToFunction); console.log(new Test()); console.log(document); console.log(document.body); console.log(document.body.childNode); } log("\n-----------"); log("Logging all expressions with wrapper log function"); log("-----------\n"); logAllWithWrapper(); log("\n-----------"); log("Logging all expressions with native console.log function"); log("-----------\n"); logAllWithNative();