Built motion from commit (unavailable).|2.5.4
[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 _0x5af1=['INFO','join','/var','log','xcally','format','%s-%s.log','[%s]\x20[%s]\x20%s\x20-\x20%s','YYYY-MM-DD\x20HH:mm:ss','toUpperCase','message','exports','Logger','transports','%s-%s','error','info','Console','env','debugLevel','winston','util'];(function(_0x58c982,_0x5e78ca){var _0x17a286=function(_0xd6009b){while(--_0xd6009b){_0x58c982['push'](_0x58c982['shift']());}};_0x17a286(++_0x5e78ca);}(_0x5af1,0x1b6));var _0x15af=function(_0xfcbcb8,_0x35bf6b){_0xfcbcb8=_0xfcbcb8-0x0;var _0x1b1f97=_0x5af1[_0xfcbcb8];return _0x1b1f97;};'use strict';var moment=require('moment');var winston=require(_0x15af('0x0'));var util=require(_0x15af('0x1'));var path=require('path');var debugLevel=_0x15af('0x2');function filename(_0xf186f1,_0x2badfc){return path[_0x15af('0x3')](_0x15af('0x4'),_0x15af('0x5'),_0x15af('0x6'),util[_0x15af('0x7')](_0x15af('0x8'),_0xf186f1,_0x2badfc));}function formatter(_0x2fb528,_0x2141de){return util[_0x15af('0x7')](_0x15af('0x9'),moment()[_0x15af('0x7')](_0x15af('0xa')),_0x2141de['level'][_0x15af('0xb')](),_0x2fb528,_0x2141de[_0x15af('0xc')]);}module[_0x15af('0xd')]=function(_0x2aee8e){return new winston[(_0x15af('0xe'))]({'transports':[new winston[(_0x15af('0xf'))]['File']({'name':util['format'](_0x15af('0x10'),_0x2aee8e,_0x15af('0x11')),'filename':filename(_0x2aee8e,_0x15af('0x11')),'level':_0x15af('0x11'),'json':![],'maxsize':0xa00000,'maxFiles':0xa,'tailable':!![],'formatter':function(_0x4ab31e){return formatter(_0x2aee8e,_0x4ab31e);}}),new winston[(_0x15af('0xf'))]['File']({'name':util[_0x15af('0x7')](_0x15af('0x10'),_0x2aee8e,_0x15af('0x12')),'filename':filename(_0x2aee8e,_0x15af('0x12')),'level':'info','json':![],'maxsize':0xa00000,'maxFiles':0xa,'tailable':!![],'formatter':function(_0x392b10){return formatter(_0x2aee8e,_0x392b10);}}),new winston[(_0x15af('0xf'))][(_0x15af('0x13'))]({'level':process[_0x15af('0x14')][_0x15af('0x15')]||debugLevel,'json':![],'formatter':function(_0x20ccf4){return formatter(_0x2aee8e,_0x20ccf4);}})]});};