Built motion from commit 9e1399f3.|2.5.37
[motion2.git] / server / config / logger.js
index d982e0f..e1ec04e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6f26=['util','path','join','/var','log','%s-%s.log','message','replace','{{{','}}}','format','[%s]\x20[%s]\x20%s\x20-\x20%s','YYYY-MM-DD\x20HH:mm:ss','level','toUpperCase','exports','Logger','transports','File','%s-%s','error','info','env'];(function(_0x36b8a2,_0x1d742f){var _0x1c98c5=function(_0x35ccf4){while(--_0x35ccf4){_0x36b8a2['push'](_0x36b8a2['shift']());}};_0x1c98c5(++_0x1d742f);}(_0x6f26,0x12b));var _0x66f2=function(_0x6cd197,_0x33df63){_0x6cd197=_0x6cd197-0x0;var _0x3480c7=_0x6f26[_0x6cd197];return _0x3480c7;};'use strict';var moment=require('moment');var winston=require('winston');var util=require(_0x66f2('0x0'));var path=require(_0x66f2('0x1'));var debugLevel='INFO';function filename(_0x16aae9,_0x34567e){return path[_0x66f2('0x2')](_0x66f2('0x3'),_0x66f2('0x4'),'xcally',util['format'](_0x66f2('0x5'),_0x16aae9,_0x34567e));}function formatter(_0x15ac8c,_0x2f937e){_0x2f937e[_0x66f2('0x6')]=_0x2f937e['message'][_0x66f2('0x7')](/@@{/g,_0x66f2('0x8'))[_0x66f2('0x7')](/}@@/g,_0x66f2('0x9'))[_0x66f2('0x7')](/@{/g,'{{')['replace'](/}@/g,'}}');return util[_0x66f2('0xa')](_0x66f2('0xb'),moment()['format'](_0x66f2('0xc')),_0x2f937e[_0x66f2('0xd')][_0x66f2('0xe')](),_0x15ac8c,_0x2f937e[_0x66f2('0x6')]);}module[_0x66f2('0xf')]=function(_0x50eeb5){return new winston[(_0x66f2('0x10'))]({'transports':[new winston[(_0x66f2('0x11'))][(_0x66f2('0x12'))]({'name':util[_0x66f2('0xa')](_0x66f2('0x13'),_0x50eeb5,_0x66f2('0x14')),'filename':filename(_0x50eeb5,_0x66f2('0x14')),'level':_0x66f2('0x14'),'json':![],'maxsize':0xa00000,'maxFiles':0xa,'tailable':!![],'formatter':function(_0x5784e0){return formatter(_0x50eeb5,_0x5784e0);}}),new winston['transports'][(_0x66f2('0x12'))]({'name':util[_0x66f2('0xa')](_0x66f2('0x13'),_0x50eeb5,_0x66f2('0x15')),'filename':filename(_0x50eeb5,_0x66f2('0x15')),'level':_0x66f2('0x15'),'json':![],'maxsize':0xa00000,'maxFiles':0xa,'tailable':!![],'formatter':function(_0x8be152){return formatter(_0x50eeb5,_0x8be152);}}),new winston[(_0x66f2('0x11'))]['Console']({'level':process[_0x66f2('0x16')]['debugLevel']||debugLevel,'json':![],'formatter':function(_0x68afb){return formatter(_0x50eeb5,_0x68afb);}})]});};
\ No newline at end of file
+var _0x2086=['INFO','join','/var','log','xcally','%s-%s.log','message','replace','{{{','}}}','format','[%s]\x20[%s]\x20%s\x20-\x20%s','toUpperCase','exports','File','%s-%s','error','transports','info','Console','debugLevel','moment','winston','path'];(function(_0x5e3701,_0x596265){var _0x345dcf=function(_0x5eb12a){while(--_0x5eb12a){_0x5e3701['push'](_0x5e3701['shift']());}};_0x345dcf(++_0x596265);}(_0x2086,0x165));var _0x6208=function(_0x490319,_0x7c50af){_0x490319=_0x490319-0x0;var _0x24b6ed=_0x2086[_0x490319];return _0x24b6ed;};'use strict';var moment=require(_0x6208('0x0'));var winston=require(_0x6208('0x1'));var util=require('util');var path=require(_0x6208('0x2'));var debugLevel=_0x6208('0x3');function filename(_0x5adb71,_0x52df5d){return path[_0x6208('0x4')](_0x6208('0x5'),_0x6208('0x6'),_0x6208('0x7'),util['format'](_0x6208('0x8'),_0x5adb71,_0x52df5d));}function formatter(_0x3c3573,_0x17b6ef){_0x17b6ef[_0x6208('0x9')]=_0x17b6ef['message'][_0x6208('0xa')](/@@{/g,_0x6208('0xb'))[_0x6208('0xa')](/}@@/g,_0x6208('0xc'))[_0x6208('0xa')](/@{/g,'{{')[_0x6208('0xa')](/}@/g,'}}');return util[_0x6208('0xd')](_0x6208('0xe'),moment()[_0x6208('0xd')]('YYYY-MM-DD\x20HH:mm:ss'),_0x17b6ef['level'][_0x6208('0xf')](),_0x3c3573,_0x17b6ef['message']);}module[_0x6208('0x10')]=function(_0x136441){return new winston['Logger']({'transports':[new winston['transports'][(_0x6208('0x11'))]({'name':util[_0x6208('0xd')](_0x6208('0x12'),_0x136441,'error'),'filename':filename(_0x136441,_0x6208('0x13')),'level':_0x6208('0x13'),'json':![],'maxsize':0xa00000,'maxFiles':0xa,'tailable':!![],'formatter':function(_0x2d8ce3){return formatter(_0x136441,_0x2d8ce3);}}),new winston[(_0x6208('0x14'))]['File']({'name':util[_0x6208('0xd')](_0x6208('0x12'),_0x136441,_0x6208('0x15')),'filename':filename(_0x136441,_0x6208('0x15')),'level':'info','json':![],'maxsize':0xa00000,'maxFiles':0xa,'tailable':!![],'formatter':function(_0x59412b){return formatter(_0x136441,_0x59412b);}}),new winston[(_0x6208('0x14'))][(_0x6208('0x16'))]({'level':process['env'][_0x6208('0x17')]||debugLevel,'json':![],'formatter':function(_0x292786){return formatter(_0x136441,_0x292786);}})]});};
\ No newline at end of file