import {configure, getLogger} from 'log4js';

const logger = getLogger();
logger.level = 'debug';

configure({
    appenders: {
        console: {
            type: 'stdout',
            layout: {
                type: 'pattern',
                pattern: '%d{yyyy-MM-dd hh:mm:ss.SSS} %p %c %m%n'
            }
        },
        everything: {type: 'dateFile', filename: 'stc-msclient.log', pattern: '.yyyy-MM-dd', compress: true}
    },
    categories: {
        default: {appenders: ['console', 'everything'], level: 'info'}
    }
});

export {logger}