Built motion from commit (unavailable).|2.5.29
[motion2.git] / server / config / logger.js
1 // *************************************************************************
2 // *                                                                       *
3 // * xCALLY Motion -  The Omnichannel Contact Center                       *
4 // * Copyright (c) Xenialab s.r.l. All Rights Reserved                     *
5 // *                                                                       *
6 // *************************************************************************
7 // *                                                                       *
8 // * Email: info@xcally.com                                                *
9 // * Website: https://www.xcally.com                                       *
10 // *                                                                       *
11 // *************************************************************************
12 // *                                                                       *
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.                         *
16 // *                                                                       *
17 // *************************************************************************
18 var _0xbce9=['File','%s-%s','error','Console','env','debugLevel','moment','winston','util','path','INFO','join','log','xcally','%s-%s.log','replace','{{{','}}}','format','[%s]\x20[%s]\x20%s\x20-\x20%s','YYYY-MM-DD\x20HH:mm:ss','toUpperCase','message','exports','Logger','transports'];(function(_0x27ada2,_0x2e1eed){var _0x1f2e2b=function(_0x3699f6){while(--_0x3699f6){_0x27ada2['push'](_0x27ada2['shift']());}};_0x1f2e2b(++_0x2e1eed);}(_0xbce9,0x1f4));var _0x9bce=function(_0x4bf77c,_0x53999d){_0x4bf77c=_0x4bf77c-0x0;var _0x5d73c5=_0xbce9[_0x4bf77c];return _0x5d73c5;};'use strict';var moment=require(_0x9bce('0x0'));var winston=require(_0x9bce('0x1'));var util=require(_0x9bce('0x2'));var path=require(_0x9bce('0x3'));var debugLevel=_0x9bce('0x4');function filename(_0x1e8d7d,_0x11cfff){return path[_0x9bce('0x5')]('/var',_0x9bce('0x6'),_0x9bce('0x7'),util['format'](_0x9bce('0x8'),_0x1e8d7d,_0x11cfff));}function formatter(_0x351e63,_0x48b9df){_0x48b9df['message']=_0x48b9df['message'][_0x9bce('0x9')](/@@{/g,_0x9bce('0xa'))[_0x9bce('0x9')](/}@@/g,_0x9bce('0xb'))[_0x9bce('0x9')](/@{/g,'{{')['replace'](/}@/g,'}}');return util[_0x9bce('0xc')](_0x9bce('0xd'),moment()[_0x9bce('0xc')](_0x9bce('0xe')),_0x48b9df['level'][_0x9bce('0xf')](),_0x351e63,_0x48b9df[_0x9bce('0x10')]);}module[_0x9bce('0x11')]=function(_0xd1535c){return new winston[(_0x9bce('0x12'))]({'transports':[new winston[(_0x9bce('0x13'))][(_0x9bce('0x14'))]({'name':util[_0x9bce('0xc')](_0x9bce('0x15'),_0xd1535c,'error'),'filename':filename(_0xd1535c,_0x9bce('0x16')),'level':_0x9bce('0x16'),'json':![],'maxsize':0xa00000,'maxFiles':0xa,'tailable':!![],'formatter':function(_0x284a56){return formatter(_0xd1535c,_0x284a56);}}),new winston[(_0x9bce('0x13'))][(_0x9bce('0x14'))]({'name':util[_0x9bce('0xc')](_0x9bce('0x15'),_0xd1535c,'info'),'filename':filename(_0xd1535c,'info'),'level':'info','json':![],'maxsize':0xa00000,'maxFiles':0xa,'tailable':!![],'formatter':function(_0x3bcdcc){return formatter(_0xd1535c,_0x3bcdcc);}}),new winston[(_0x9bce('0x13'))][(_0x9bce('0x17'))]({'level':process[_0x9bce('0x18')][_0x9bce('0x19')]||debugLevel,'json':![],'formatter':function(_0x249bc0){return formatter(_0xd1535c,_0x249bc0);}})]});};