Built motion from commit (unavailable).|2.4.18
[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 _0x160f=['xcally','format','%s-%s.log','level','message','exports','Logger','transports','File','%s-%s','error','info','Console','env','debugLevel','moment','winston','util','path','INFO','join','/var','log'];(function(_0x231e16,_0x67347b){var _0x570a7c=function(_0x2c35b4){while(--_0x2c35b4){_0x231e16['push'](_0x231e16['shift']());}};_0x570a7c(++_0x67347b);}(_0x160f,0x6b));var _0xf160=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x160f[_0x3dd15e];return _0x231fd0;};'use strict';var moment=require(_0xf160('0x0'));var winston=require(_0xf160('0x1'));var util=require(_0xf160('0x2'));var path=require(_0xf160('0x3'));var debugLevel=_0xf160('0x4');function filename(_0x83b1e1,_0x4241cc){return path[_0xf160('0x5')](_0xf160('0x6'),_0xf160('0x7'),_0xf160('0x8'),util[_0xf160('0x9')](_0xf160('0xa'),_0x83b1e1,_0x4241cc));}function formatter(_0x402fca,_0x10b904){return util[_0xf160('0x9')]('[%s]\x20[%s]\x20%s\x20-\x20%s',moment()['format']('YYYY-MM-DD\x20HH:mm:ss'),_0x10b904[_0xf160('0xb')]['toUpperCase'](),_0x402fca,_0x10b904[_0xf160('0xc')]);}module[_0xf160('0xd')]=function(_0x48df25){return new winston[(_0xf160('0xe'))]({'transports':[new winston[(_0xf160('0xf'))][(_0xf160('0x10'))]({'name':util[_0xf160('0x9')](_0xf160('0x11'),_0x48df25,'error'),'filename':filename(_0x48df25,_0xf160('0x12')),'level':_0xf160('0x12'),'json':![],'maxsize':0xa00000,'maxFiles':0xa,'tailable':!![],'formatter':function(_0x5ef2c9){return formatter(_0x48df25,_0x5ef2c9);}}),new winston[(_0xf160('0xf'))][(_0xf160('0x10'))]({'name':util[_0xf160('0x9')](_0xf160('0x11'),_0x48df25,_0xf160('0x13')),'filename':filename(_0x48df25,_0xf160('0x13')),'level':_0xf160('0x13'),'json':![],'maxsize':0xa00000,'maxFiles':0xa,'tailable':!![],'formatter':function(_0x2fea4a){return formatter(_0x48df25,_0x2fea4a);}}),new winston['transports'][(_0xf160('0x14'))]({'level':process[_0xf160('0x15')][_0xf160('0x16')]||debugLevel,'json':![],'formatter':function(_0x226d10){return formatter(_0x48df25,_0x226d10);}})]});};