/**
 * Define a server logger for a context.
 * @function serverside.logger.newServerLogger
 * @param {object} context - Sever context object.
 * @returns {object} - An logger object.
 * @protected
 * @ignore
 * @author Taka Okunishi
 */
var path = require('path'),
    lib = require('../../lib'),
    log = lib.log,
    ServerLogger = log.ServerLogger;

module.exports = function (context) {
    return new ServerLogger(context.LOG_LEVEL)
        .filename(path.resolve(context.SERVER_LOG_PATH))
        .console(!!context.CONSOLE_ENABLED);
};