/*jslint node: true, vars: true, indent: 4 */
(function (module) {
    "use strict";

    function convert(id, session, _args) {
        var args = Array.prototype.slice.call(_args, 2),
            params = [
                _args[0],
                _args[1],
                id,
                session
            ];

        args.forEach(function (arg) {
            var param = JSON.parse(arg);

            params.push(param);
        });

        return params;
    }

    module.exports = function (logger) {
        return {
            'log':function () {
                var client = this,
                    args = arguments;

                return client.get("id", function (err, id) {
                    var params = convert(client.id, id, args),
                        level = params.shift(),
                        _logger = logger[level] || logger.info;
                    return _logger.apply(_logger, params);
                });
            }
        }
    };
})(module);
@@ -633,16 +633,56 @@
 ments;%0A%0A
+                //TODO: does this work?%0A
         
@@ -707,11 +707,10 @@
 ent.
-get
+on
 (%22id
@@ -729,24 +729,118 @@
 (err, id) %7B%0A
+                    console.log('err: ' + err);%0A                    console.log('id: ' + id);%0A
             

refactor socket.io