GT2/GT2-iOS/node_modules/xdl/build/__sourcemaps__/Logger.js.map

1 line
3.0 KiB
Plaintext
Raw Normal View History

2018-02-12 17:26:06 +00:00
{"version":3,"sources":["Logger.js"],"names":["ConsoleRawStream","write","rec","level","bunyan","INFO","console","log","WARN","info","ERROR","warn","error","let","logger","createLogger","name","serializers","stdSerializers","streams","type","path","join","UserSettings","dotExpoHomeDirectory","period","count","process","env","DEBUG","NODE_ENV","stream","closeOnExit","notifications","child","global"],"mappings":";;;;;;;;AAIA;AAAA;AAAA;;AACA;;;;AAEA;AAAA;AAAA;;;;AAEA,MAAMA,gBAAN,CAAuB;AACrBC,QAAMC,GAAND,EAAW;AACT,QAAIC,IAAIC,KAAJD,GAAYE,oCAAOC,IAAvB,EAA6B;AAC3BC,cAAQC,GAARD,CAAYJ,GAAZI;AACF,KAFA,MAEO,IAAIJ,IAAIC,KAAJD,GAAYE,oCAAOI,IAAvB,EAA6B;AAClCF,cAAQG,IAARH,CAAaJ,GAAbI;AACF,KAFO,MAEA,IAAIJ,IAAIC,KAAJD,GAAYE,oCAAOM,KAAvB,EAA8B;AACnCJ,cAAQK,IAARL,CAAaJ,GAAbI;AACF,KAFO,MAEA;AACLA,cAAQM,KAARN,CAAcJ,GAAdI;AACF;AACF;AAXqB;;AAcvB;;;AACAO,IAAIC,SAAcV,oCAAOW,YAAPX,CAAoB;AACpCY,QAAM,MAD8B;AAEpCC,eAAab,oCAAOc,cAFgB;AAGpCC,WAAS,CACP;AACEhB,WAAO,OADT;AAEEiB,UAAM,eAFR;AAGEC,UAAMA,cAAKC,IAALD,CAAUE,gDAAaC,oBAAbD,EAAVF,EAA+C,KAA/CA,CAHR;AAIEI,YAAQ,IAJV,EAIc;AACZC,WAAO,CALT,CAKU;AALV,GADO,EAQP,IAAIC,QAAQC,GAARD,CAAYE,KAAZF,IAAqBA,QAAQC,GAARD,CAAYG,QAAZH,KAAyB,YAA9CA,GACA,CACE;AACEP,UAAM,KADR;AAEEW,YAAQ,IAAI/B,gBAAJ,EAFV;AAGEgC,iBAAa,KAHf;AAIE7B,WAAO;AAJT,GADF,CADAwB,GASA,EATJ,CARO;AAH2B,CAApBvB,CAAlBS;;AAwBAC,OAAOmB,aAAPnB,GAAuBA,OAAOoB,KAAPpB,CAAa,EAAEM,MAAM,eAAR,EAAbN,CAAvBA;AACAA,OAAOqB,MAAPrB,GAAgBA,OAAOoB,KAAPpB,CAAa,EAAEM,MAAM,QAAR,EAAbN,CAAhBA;AACAA,OAAOe,KAAPf,GAAeV,oCAAOyB,KAAtBf;AACAA,OAAOT,IAAPS,GAAcV,oCAAOC,IAArBS;AACAA,OAAON,IAAPM,GAAcV,oCAAOI,IAArBM;AACAA,OAAOJ,KAAPI,GAAeV,oCAAOM,KAAtBI;;kBAEeA,M","file":"../Logger.js","sourcesContent":["/**\n * @flow\n */\n\nimport bunyan from '@expo/bunyan';\nimport path from 'path';\n\nimport UserSettings from './UserSettings';\n\nclass ConsoleRawStream {\n write(rec) {\n if (rec.level < bunyan.INFO) {\n console.log(rec);\n } else if (rec.level < bunyan.WARN) {\n console.info(rec);\n } else if (rec.level < bunyan.ERROR) {\n console.warn(rec);\n } else {\n console.error(rec);\n }\n }\n}\n\n// TODO(perry) teach flow about the logger type here\nlet logger: any = bunyan.createLogger({\n name: 'expo',\n serializers: bunyan.stdSerializers,\n streams: [\n {\n level: 'debug',\n type: 'rotating-file',\n path: path.join(UserSettings.dotExpoHomeDirectory(), 'log'),\n period: '1d', // daily rotation\n count: 3, // keep 3 back copies\n },\n ...(process.env.DEBUG && process.env.NODE_ENV !== 'production'\n ? [\n {\n type: 'raw',\n stream: new ConsoleRawStream(),\n closeOnExit: false,\n level: 'debug',\n },\n ]\n : []),\n ],\n});\n\nlogger.notifications = logger.child({ type: 'notifications' });\nlogger.global = logger.child({ type: 'global' });\nlogger.DEBUG = bunyan.DEBUG;\nlogger.INFO = bunyan.INFO;\nlogger.WARN = bunyan.WARN;\nlogger.ERROR = bunyan.ERROR;\n\nexport default logger;\n"],"sourceRoot":"/xdl/src"}