1 // *************************************************************************
3 // * xCALLY Motion - The Omnichannel Contact Center *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved *
6 // *************************************************************************
8 // * Email: info@xcally.com *
9 // * Website: https://www.xcally.com *
11 // *************************************************************************
13 // * The SOFTWARE PRODUCT is protected by copyright laws and international *
14 // * copyright treaties, as well as other intellectual property laws and *
15 // * treaties. The SOFTWARE PRODUCT is licensed, not sold. *
17 // *************************************************************************
18 var _0xbbce=['level','toUpperCase','message','exports','transports','%s-%s','error','File','info','Console','env','debugLevel','moment','winston','util','path','INFO','/var','xcally','format','YYYY-MM-DD\x20HH:mm:ss'];(function(_0x4bf809,_0x495a4c){var _0x188d2f=function(_0x4a7469){while(--_0x4a7469){_0x4bf809['push'](_0x4bf809['shift']());}};_0x188d2f(++_0x495a4c);}(_0xbbce,0xb4));var _0xebbc=function(_0x56d82d,_0x4bcfc4){_0x56d82d=_0x56d82d-0x0;var _0x8a0984=_0xbbce[_0x56d82d];return _0x8a0984;};'use strict';var moment=require(_0xebbc('0x0'));var winston=require(_0xebbc('0x1'));var util=require(_0xebbc('0x2'));var path=require(_0xebbc('0x3'));var debugLevel=_0xebbc('0x4');function filename(_0x248845,_0x59eca6){return path['join'](_0xebbc('0x5'),'log',_0xebbc('0x6'),util[_0xebbc('0x7')]('%s-%s.log',_0x248845,_0x59eca6));}function formatter(_0x2659ea,_0x4d665e){return util['format']('[%s]\x20[%s]\x20%s\x20-\x20%s',moment()['format'](_0xebbc('0x8')),_0x4d665e[_0xebbc('0x9')][_0xebbc('0xa')](),_0x2659ea,_0x4d665e[_0xebbc('0xb')]);}module[_0xebbc('0xc')]=function(_0x681f41){return new winston['Logger']({'transports':[new winston[(_0xebbc('0xd'))]['File']({'name':util[_0xebbc('0x7')](_0xebbc('0xe'),_0x681f41,_0xebbc('0xf')),'filename':filename(_0x681f41,'error'),'level':_0xebbc('0xf'),'json':![],'maxsize':0xa00000,'maxFiles':0xa,'tailable':!![],'formatter':function(_0x10bcc2){return formatter(_0x681f41,_0x10bcc2);}}),new winston[(_0xebbc('0xd'))][(_0xebbc('0x10'))]({'name':util['format'](_0xebbc('0xe'),_0x681f41,_0xebbc('0x11')),'filename':filename(_0x681f41,'info'),'level':_0xebbc('0x11'),'json':![],'maxsize':0xa00000,'maxFiles':0xa,'tailable':!![],'formatter':function(_0x37d6e9){return formatter(_0x681f41,_0x37d6e9);}}),new winston[(_0xebbc('0xd'))][(_0xebbc('0x12'))]({'level':process[_0xebbc('0x13')][_0xebbc('0x14')]||debugLevel,'json':![],'formatter':function(_0xb83d62){return formatter(_0x681f41,_0xb83d62);}})]});};