/*global document*/
"use strict";

var element;
var elementName;

var console = function (name) {
    elementName = name;
    return console;
};

function actuallyAppendChild(el) {
    element.appendChild(el);
}

function determineElement(el) {
    element = elementName ? document.getElementById(elementName) : document.body;
    appendChild = actuallyAppendChild; // Reassign. Isn't JavaScript cool?
    appendChild(el);
}

var appendChild = determineElement;

console.log = function log(msg) {
    var el = document.createElement("pre");
    el.style.margin = "0";
    el.textContent = msg;
    appendChild(el);
};

module.exports = console;

@@ -28,16 +28,73 @@
 rict%22;%0A%0A
+var substituteStrings = require(%22./substituteStrings%22);%0A%0A
 var elem
@@ -544,15 +544,109 @@
 log(
-msg
 ) %7B%0A
+    var args = Array.prototype.slice.call(arguments, 0);%0A    var text = substituteStrings(args);%0A
     
@@ -737,11 +737,12 @@
 t = 
-msg
+text
 ;%0A  

Call `substituteStrings` from `console.log`.