function getLogger(moduleName) {
    var levels = ['log', 'info', 'warning', 'warn', 'debug', 'error'];

    if (!window.console) {
        var noop = function() {};
        var result = {func: function() { return this; }};
        levels.forEach(function(level) {
            result[level] = noop;
        })
    }

    function logWithPrefix(prefix, method, args) {
        var message = Array.prototype.slice.call(args);
        message.unshift('[' + prefix + ']:');
        console[method].apply(console, message);
    }

    var logger = {};

    levels.forEach(function(level) {
        logger[level] = function() {
            logWithPrefix(moduleName, level === 'warning' ? 'warn' : level, arguments);
        };
    });

    logger.local = function(funcName) {
        var funcLogger = {};
        levels.forEach(function(level) {
            funcLogger[level] = function() {
                logWithPrefix(moduleName + '/' + funcName, level === 'warning' ? 'warn' : level, arguments);
            };
        });
        return funcLogger;
    };

    return logger;
}