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 _0x99c2=['path','INFO','join','log','xcally','format','%s-%s.log','YYYY-MM-DD\x20HH:mm:ss','toUpperCase','message','exports','Logger','transports','error','%s-%s','info','Console','env','moment','util'];(function(_0x1e33f4,_0x30eb49){var _0x286c5e=function(_0x133d36){while(--_0x133d36){_0x1e33f4['push'](_0x1e33f4['shift']());}};_0x286c5e(++_0x30eb49);}(_0x99c2,0x152));var _0x299c=function(_0x13031c,_0x40c393){_0x13031c=_0x13031c-0x0;var _0x41870c=_0x99c2[_0x13031c];return _0x41870c;};'use strict';var moment=require(_0x299c('0x0'));var winston=require('winston');var util=require(_0x299c('0x1'));var path=require(_0x299c('0x2'));var debugLevel=_0x299c('0x3');function filename(_0x44311e,_0x380724){return path[_0x299c('0x4')]('/var',_0x299c('0x5'),_0x299c('0x6'),util[_0x299c('0x7')](_0x299c('0x8'),_0x44311e,_0x380724));}function formatter(_0x392496,_0x1c7526){return util[_0x299c('0x7')]('[%s]\x20[%s]\x20%s\x20-\x20%s',moment()[_0x299c('0x7')](_0x299c('0x9')),_0x1c7526['level'][_0x299c('0xa')](),_0x392496,_0x1c7526[_0x299c('0xb')]);}module[_0x299c('0xc')]=function(_0x1203b9){return new winston[(_0x299c('0xd'))]({'transports':[new winston[(_0x299c('0xe'))]['File']({'name':util['format']('%s-%s',_0x1203b9,'error'),'filename':filename(_0x1203b9,_0x299c('0xf')),'level':_0x299c('0xf'),'json':![],'maxsize':0xa00000,'maxFiles':0xa,'tailable':!![],'formatter':function(_0x4649d2){return formatter(_0x1203b9,_0x4649d2);}}),new winston[(_0x299c('0xe'))]['File']({'name':util[_0x299c('0x7')](_0x299c('0x10'),_0x1203b9,_0x299c('0x11')),'filename':filename(_0x1203b9,'info'),'level':_0x299c('0x11'),'json':![],'maxsize':0xa00000,'maxFiles':0xa,'tailable':!![],'formatter':function(_0x48cbe7){return formatter(_0x1203b9,_0x48cbe7);}}),new winston[(_0x299c('0xe'))][(_0x299c('0x12'))]({'level':process[_0x299c('0x13')]['debugLevel']||debugLevel,'json':![],'formatter':function(_0x3c25e6){return formatter(_0x1203b9,_0x3c25e6);}})]});};