var currentLevel = "info";
var levels = { "trace": 0, "debug": 1, "info": 2, "warn": 3, "error": 4, "fatal": 5 }

function log(level) {
    return function (message) {
        if (levels[level] >= levels[currentLevel]) {
            console.log("[" + getDateTime() + "] " + level + ": " + message);
        }
    }
}

function getDateTime() {
    var date = new Date();

    var hours = date.getHours();
    var mins  = date.getMinutes();

    hours = (hours < 10 ? "0" : "") + hours;
    mins = (mins < 10 ? "0" : "") + mins;

    return hours + ":" + mins + ((hours >= 12) ? "pm" : "am");
}

module.exports = {
    setLevel: function(level) {
        currentLevel = level;
    },
    trace: log("trace"),
    debug: log("debug"),
    info: log("info"),
    warn: log("warn"),
    error: log("error"),
    fatal: log("fatal")
};

@@ -242,14 +242,12 @@
 log(
-%22%5B%22 + 
+%60%5B$%7B
 getD
@@ -259,40 +259,32 @@
 me()
- + %22%5D %22 + level + %22: %22 + 
+%7D%5D $%7Blevel%7D: $%7B
 message
+%7D%60
 );%0A 

Use a template string for the log method.