Built motion from commit 9e1399f3.|2.5.37
[motion2.git] / server / config / logger.js
index 099ce5a..e1ec04e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf54a=['path','INFO','/var','log','xcally','format','%s-%s.log','level','toUpperCase','message','exports','Logger','transports','File','%s-%s','error','info','Console','env','debugLevel','winston','util'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0xf54a,0x1b6));var _0xaf54=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xf54a[_0x3dd15e];return _0x231fd0;};'use strict';var moment=require('moment');var winston=require(_0xaf54('0x0'));var util=require(_0xaf54('0x1'));var path=require(_0xaf54('0x2'));var debugLevel=_0xaf54('0x3');function filename(_0x13fa20,_0x20d158){return path['join'](_0xaf54('0x4'),_0xaf54('0x5'),_0xaf54('0x6'),util[_0xaf54('0x7')](_0xaf54('0x8'),_0x13fa20,_0x20d158));}function formatter(_0x1d48b7,_0x69fd4d){return util[_0xaf54('0x7')]('[%s]\x20[%s]\x20%s\x20-\x20%s',moment()['format']('YYYY-MM-DD\x20HH:mm:ss'),_0x69fd4d[_0xaf54('0x9')][_0xaf54('0xa')](),_0x1d48b7,_0x69fd4d[_0xaf54('0xb')]);}module[_0xaf54('0xc')]=function(_0x784c74){return new winston[(_0xaf54('0xd'))]({'transports':[new winston[(_0xaf54('0xe'))][(_0xaf54('0xf'))]({'name':util[_0xaf54('0x7')](_0xaf54('0x10'),_0x784c74,_0xaf54('0x11')),'filename':filename(_0x784c74,'error'),'level':_0xaf54('0x11'),'json':![],'maxsize':0xa00000,'maxFiles':0xa,'tailable':!![],'formatter':function(_0x50158d){return formatter(_0x784c74,_0x50158d);}}),new winston[(_0xaf54('0xe'))]['File']({'name':util[_0xaf54('0x7')](_0xaf54('0x10'),_0x784c74,_0xaf54('0x12')),'filename':filename(_0x784c74,_0xaf54('0x12')),'level':_0xaf54('0x12'),'json':![],'maxsize':0xa00000,'maxFiles':0xa,'tailable':!![],'formatter':function(_0x2b2bc8){return formatter(_0x784c74,_0x2b2bc8);}}),new winston[(_0xaf54('0xe'))][(_0xaf54('0x13'))]({'level':process[_0xaf54('0x14')][_0xaf54('0x15')]||debugLevel,'json':![],'formatter':function(_0x11dfd3){return formatter(_0x784c74,_0x11dfd3);}})]});};
\ 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