advanced-logger
Version:
Advanced logger module extendable with plugins. Works in nodejs and browsers
2 lines • 19.8 kB
JavaScript
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("axios")):"function"==typeof define&&define.amd?define(["axios"],t):"object"==typeof exports?exports.advancedLogger=t(require("axios")):e.advancedLogger=t(e.axios)}(self,(e=>(()=>{var t={187:e=>{"use strict";var t,n="object"==typeof Reflect?Reflect:null,r=n&&"function"==typeof n.apply?n.apply:function(e,t,n){return Function.prototype.apply.call(e,t,n)};t=n&&"function"==typeof n.ownKeys?n.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(n,r){function i(n){e.removeListener(t,o),r(n)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),n([].slice.call(arguments))}p(e,t,o,{once:!0}),"error"!==t&&function(e,t,n){"function"==typeof e.on&&p(e,"error",t,{once:!0})}(e,i)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function l(e,t,n,r){var i,o,s,l;if(a(n),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),o=e._events),s=o[t]),void 0===s)s=o[t]=n,++e._eventsCount;else if("function"==typeof s?s=o[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(i=u(e))>0&&s.length>i&&!s.warned){s.warned=!0;var c=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=s.length,l=c,console&&console.warn&&console.warn(l)}return e}function c(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},i=c.bind(r);return i.listener=n,r.wrapFn=i,i}function h(e,t,n){var r=e._events;if(void 0===r)return[];var i=r[t];return void 0===i?[]:"function"==typeof i?n?[i.listener||i]:[i]:n?function(e){for(var t=new Array(e.length),n=0;n<t.length;++n)t[n]=e[n].listener||e[n];return t}(i):v(i,i.length)}function d(e){var t=this._events;if(void 0!==t){var n=t[e];if("function"==typeof n)return 1;if(void 0!==n)return n.length}return 0}function v(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function p(e,t,n,r){if("function"==typeof e.on)r.once?e.once(t,n):e.on(t,n);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(o){r.once&&e.removeEventListener(t,i),n(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return u(this)},o.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var i="error"===e,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var u=o[e];if(void 0===u)return!1;if("function"==typeof u)r(u,this,t);else{var l=u.length,c=v(u,l);for(n=0;n<l;++n)r(c[n],this,t)}return!0},o.prototype.addListener=function(e,t){return l(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return l(this,e,t,!0)},o.prototype.once=function(e,t){return a(t),this.on(e,f(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,f(this,e,t)),this},o.prototype.removeListener=function(e,t){var n,r,i,o,s;if(a(t),void 0===(r=this._events))return this;if(void 0===(n=r[e]))return this;if(n===t||n.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete r[e],r.removeListener&&this.emit("removeListener",e,n.listener||t));else if("function"!=typeof n){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===t||n[o].listener===t){s=n[o].listener,i=o;break}if(i<0)return this;0===i?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,i),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,s||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,n,r;if(void 0===(n=this._events))return this;if(void 0===n.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==n[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete n[e]),this;if(0===arguments.length){var i,o=Object.keys(n);for(r=0;r<o.length;++r)"removeListener"!==(i=o[r])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=n[e]))this.removeListener(e,t);else if(void 0!==t)for(r=t.length-1;r>=0;r--)this.removeListener(e,t[r]);return this},o.prototype.listeners=function(e){return h(this,e,!0)},o.prototype.rawListeners=function(e){return h(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):d.call(e,t)},o.prototype.listenerCount=d,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},445:e=>{e.exports=s,s.default=s,s.stable=c,s.stableStringify=c;var t="[...]",n="[Circular]",r=[],i=[];function o(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function s(e,t,n,s){var a;void 0===s&&(s=o()),u(e,"",0,[],void 0,0,s);try{a=0===i.length?JSON.stringify(e,t,n):JSON.stringify(e,h(t),n)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==r.length;){var l=r.pop();4===l.length?Object.defineProperty(l[0],l[1],l[3]):l[0][l[1]]=l[2]}}return a}function a(e,t,n,o){var s=Object.getOwnPropertyDescriptor(o,n);void 0!==s.get?s.configurable?(Object.defineProperty(o,n,{value:e}),r.push([o,n,t,s])):i.push([t,n,e]):(o[n]=e,r.push([o,n,t]))}function u(e,r,i,o,s,l,c){var f;if(l+=1,"object"==typeof e&&null!==e){for(f=0;f<o.length;f++)if(o[f]===e)return void a(n,e,r,s);if(void 0!==c.depthLimit&&l>c.depthLimit)return void a(t,e,r,s);if(void 0!==c.edgesLimit&&i+1>c.edgesLimit)return void a(t,e,r,s);if(o.push(e),Array.isArray(e))for(f=0;f<e.length;f++)u(e[f],f,f,o,e,l,c);else{var h=Object.keys(e);for(f=0;f<h.length;f++){var d=h[f];u(e[d],d,f,o,e,l,c)}}o.pop()}}function l(e,t){return e<t?-1:e>t?1:0}function c(e,t,n,s){void 0===s&&(s=o());var a,u=f(e,"",0,[],void 0,0,s)||e;try{a=0===i.length?JSON.stringify(u,t,n):JSON.stringify(u,h(t),n)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==r.length;){var l=r.pop();4===l.length?Object.defineProperty(l[0],l[1],l[3]):l[0][l[1]]=l[2]}}return a}function f(e,i,o,s,u,c,h){var d;if(c+=1,"object"==typeof e&&null!==e){for(d=0;d<s.length;d++)if(s[d]===e)return void a(n,e,i,u);try{if("function"==typeof e.toJSON)return}catch(e){return}if(void 0!==h.depthLimit&&c>h.depthLimit)return void a(t,e,i,u);if(void 0!==h.edgesLimit&&o+1>h.edgesLimit)return void a(t,e,i,u);if(s.push(e),Array.isArray(e))for(d=0;d<e.length;d++)f(e[d],d,d,s,e,c,h);else{var v={},p=Object.keys(e).sort(l);for(d=0;d<p.length;d++){var g=p[d];f(e[g],g,d,s,e,c,h),v[g]=e[g]}if(void 0===u)return v;r.push([u,i,e]),u[i]=v}s.pop()}}function h(e){return e=void 0!==e?e:function(e,t){return t},function(t,n){if(i.length>0)for(var r=0;r<i.length;r++){var o=i[r];if(o[1]===t&&o[0]===n){n=o[2],i.splice(r,1);break}}return e.call(this,t,n)}}},705:(e,t,n)=>{var r=n(639).Symbol;e.exports=r},239:(e,t,n)=>{var r=n(705),i=n(607),o=n(333),s=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":s&&s in Object(e)?i(e):o(e)}},561:(e,t,n)=>{var r=n(990),i=/^\s+/;e.exports=function(e){return e?e.slice(0,r(e)+1).replace(i,""):e}},957:(e,t,n)=>{var r="object"==typeof n.g&&n.g&&n.g.Object===Object&&n.g;e.exports=r},607:(e,t,n)=>{var r=n(705),i=Object.prototype,o=i.hasOwnProperty,s=i.toString,a=r?r.toStringTag:void 0;e.exports=function(e){var t=o.call(e,a),n=e[a];try{e[a]=void 0;var r=!0}catch(e){}var i=s.call(e);return r&&(t?e[a]=n:delete e[a]),i}},333:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},639:(e,t,n)=>{var r=n(957),i="object"==typeof self&&self&&self.Object===Object&&self,o=r||i||Function("return this")();e.exports=o},990:e=>{var t=/\s/;e.exports=function(e){for(var n=e.length;n--&&t.test(e.charAt(n)););return n}},279:(e,t,n)=>{var r=n(218),i=n(771),o=n(841),s=Math.max,a=Math.min;e.exports=function(e,t,n){var u,l,c,f,h,d,v=0,p=!1,g=!1,y=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function m(t){var n=u,r=l;return u=l=void 0,v=t,f=e.apply(r,n)}function b(e){var n=e-d;return void 0===d||n>=t||n<0||g&&e-v>=c}function L(){var e=i();if(b(e))return E(e);h=setTimeout(L,function(e){var n=t-(e-d);return g?a(n,c-(e-v)):n}(e))}function E(e){return h=void 0,y&&u?m(e):(u=l=void 0,f)}function x(){var e=i(),n=b(e);if(u=arguments,l=this,d=e,n){if(void 0===h)return function(e){return v=e,h=setTimeout(L,t),p?m(e):f}(d);if(g)return clearTimeout(h),h=setTimeout(L,t),m(d)}return void 0===h&&(h=setTimeout(L,t)),f}return t=o(t)||0,r(n)&&(p=!!n.leading,c=(g="maxWait"in n)?s(o(n.maxWait)||0,t):c,y="trailing"in n?!!n.trailing:y),x.cancel=function(){void 0!==h&&clearTimeout(h),v=0,u=d=l=h=void 0},x.flush=function(){return void 0===h?f:E(i())},x}},218:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},5:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},448:(e,t,n)=>{var r=n(239),i=n(5);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==r(e)}},771:(e,t,n)=>{var r=n(639);e.exports=function(){return r.Date.now()}},493:(e,t,n)=>{var r=n(279),i=n(218);e.exports=function(e,t,n){var o=!0,s=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return i(n)&&(o="leading"in n?!!n.leading:o,s="trailing"in n?!!n.trailing:s),r(e,t,{leading:o,maxWait:t,trailing:s})}},841:(e,t,n)=>{var r=n(561),i=n(218),o=n(448),s=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,u=/^0o[0-7]+$/i,l=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return NaN;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=r(e);var n=a.test(e);return n||u.test(e)?l(e.slice(2),n?2:8):s.test(e)?NaN:+e}},300:t=>{"use strict";t.exports=e}},n={};function r(e){var i=n[e];if(void 0!==i)return i.exports;var o=n[e]={exports:{}};return t[e](o,o.exports,r),o.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var i={};return(()=>{"use strict";r.r(i),r.d(i,{AdvancedLogger:()=>u,TransformationEnum:()=>s,service:()=>b,strategy:()=>m});var e=r(187),t=r(493),n=r.n(t);const o={getLogIdByFields:(e,t)=>t.map((t=>`${t}-${e[t]}`)).join("-"),tryJSONStringify(e){try{return JSON.stringify(e)}catch(e){return""}}};var s;!function(e){e[e.RAPID_FIRE_GROUPING=0]="RAPID_FIRE_GROUPING"}(s||(s={}));class a{constructor(t){if(this.groupLeftIndex=-1,this.logs=[],this.eventEmitter=new e.EventEmitter,this.config=t,this.identityMap=new Map,this.config.transformations){const e=this.config.transformations.find((e=>e.type===s.RAPID_FIRE_GROUPING));e&&(this.groupableConfig=e.configuration,this.throttledOnGroupFinalize=n()(this.onGroupFinalize.bind(this),this.groupableConfig.interval,{trailing:!0,leading:!1}),this.eventEmitter.on("add",this.throttledOnGroupFinalize))}}add(e){if(this.groupableConfig){const t=o.getLogIdByFields(e,this.groupableConfig.groupIdentityFields);this.identityMap.has(t)||this.logs.push(e),this.onAddToGroup(e)}else this.logs.push(e);this.eventEmitter.emit("add",{logCount:this.size()})}clear(){this.logs.length=0,this.eventEmitter.emit("clear")}getAll(){return this.throttledOnGroupFinalize&&this.throttledOnGroupFinalize.flush(),this.logs.slice()}size(){return this.logs.length}destroy(){this.throttledOnGroupFinalize&&this.throttledOnGroupFinalize.cancel(),this.logs.splice(0),this.eventEmitter.removeAllListeners()}onAddToGroup(e){const t=o.getLogIdByFields(e,this.groupableConfig.groupIdentityFields);if(this.identityMap.has(t)){const e=this.identityMap.get(t);this.identityMap.set(t,(e||0)+1)}else this.identityMap.set(t,1)}onGroupFinalize(){const e=this.logs.length;if(e>0)for(let t=-1!==this.groupLeftIndex?this.groupLeftIndex:0;t<e;t++){const e=this.logs[t],n=o.getLogIdByFields(e,this.groupableConfig.groupIdentityFields);Object.assign(e,{[this.groupableConfig.groupFieldName]:this.identityMap.has(n)?this.identityMap.get(n):1})}this.groupLeftIndex=e>0?e-1:-1,this.identityMap.clear()}}class u{constructor(e){this.configuration=e,this.logStore=new a({transformations:this.configuration.transformations}),this.strategy=this.configuration.strategy,this.service=this.configuration.service,this.logStore.eventEmitter.on("add",this.onAdd.bind(this)),this.logStore.eventEmitter.on("clear",this.onClear.bind(this)),this.logStore.eventEmitter.on("error",this.onStoreError.bind(this)),this.strategy.eventEmitter.on("send",this.onSend.bind(this)),this.strategy.eventEmitter.on("error",this.onStrategyError.bind(this))}log(e){this.logStore.add(e)}sendAllLogs(){this.strategy.sendAll()}destroy(){this.logStore.destroy(),this.strategy.destroy(),this.service.destroy()}onStoreError(e){console.error(e)}onAdd(e){this.strategy.onAdd(e)}onClear(){this.strategy.onClear()}onStrategyError(e){console.error(e)}onSend(){return e=this,t=void 0,r=function*(){if(this.logStore.size()>0){const e=this.logStore.getAll();this.logStore.clear();try{yield this.service.sendAllLogs(e)}catch(e){console.error(e)}}},new((n=void 0)||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}));var e,t,n,r}}var l=r(445),c=r.n(l),f=r(300),h=r.n(f);const d={request:(e,t,n)=>h().request({method:e.method,headers:t,url:e.url,data:n}),delayedRetry:(e,t,n)=>new Promise(((e,r)=>{setTimeout((()=>n().then(e).catch(r)),t)})).catch((r=>e>1?d.delayedRetry(e-1,t,n):Promise.reject(r)))},v=d;var p=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))};class g{constructor(e){this.serviceConfig=Object.assign({},e.serviceConfig),this.defaultLogConfig=Object.assign({},e.defaultLogConfig),e.serializer&&(this.serializer=e.serializer)}serializer(e){return o.tryJSONStringify(e)||c()(e)}sendAllLogs(e){var t,n,r,i,o,s;return p(this,void 0,void 0,(function*(){const a=yield this.preparePayload(e),u=this.getHeaders();try{return yield v.request(this.serviceConfig,u,a)}catch(e){if((null!==(n=null===(t=this.serviceConfig)||void 0===t?void 0:t.retryAttempts)&&void 0!==n?n:0)>0)return v.delayedRetry(null!==(i=null===(r=this.serviceConfig)||void 0===r?void 0:r.retryAttempts)&&void 0!==i?i:0,null!==(s=null===(o=this.serviceConfig)||void 0===o?void 0:o.retryInterval)&&void 0!==s?s:0,v.request.bind(this,this.serviceConfig,u,a));throw e}}))}preparePayload(e){return p(this,void 0,void 0,(function*(){return e.map((e=>this.serializer(Object.assign(Object.assign({},this.defaultLogConfig),e)))).join("\n")}))}destroy(){}getHeaders(){return{}}}var y=function(e,t,n,r){return new(n||(n=Promise))((function(i,o){function s(e){try{u(r.next(e))}catch(e){o(e)}}function a(e){try{u(r.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,a)}u((r=r.apply(e,t||[])).next())}))};const m={InstantStrategy:class{constructor(){this.eventEmitter=new e.EventEmitter}onAdd(e){this.eventEmitter.emit("send")}onClear(){}sendAll(){}destroy(){this.eventEmitter.removeAllListeners()}},OnBundleSizeStrategy:class{constructor(t){this.MAX_BUNDLE_SIZE=100,this.eventEmitter=new e.EventEmitter,t.maxBundle&&(this.MAX_BUNDLE_SIZE=t.maxBundle)}onAdd(e){e&&e.logCount>=this.MAX_BUNDLE_SIZE&&this.eventEmitter.emit("send")}onClear(){}sendAll(){this.eventEmitter.emit("send")}destroy(){this.eventEmitter.removeAllListeners()}},OnRequestStrategy:class{constructor(){this.eventEmitter=new e.EventEmitter}onAdd(e){}onClear(){}sendAll(){this.eventEmitter.emit("send")}destroy(){this.eventEmitter.removeAllListeners()}},OnIntervalStrategy:class{constructor(t){this.SEND_INTERVAL=15e3,this.eventEmitter=new e.EventEmitter,t.interval&&(this.SEND_INTERVAL=t.interval),this.intervalSend=n()(this.send.bind(this),this.SEND_INTERVAL,{leading:!1,trailing:!0})}onAdd(e){e&&e.logCount>0&&this.intervalSend()}onClear(){}sendAll(){this.eventEmitter.emit("send")}destroy(){this.eventEmitter.removeAllListeners()}send(){this.eventEmitter.emit("send")}}},b={BaseRemoteService:g,SumologicService:class extends g{getHeaders(){const e=this.serviceConfig;return{"Content-Type":"application/json","X-Sumo-Category":e.sourceCategory,"X-Sumo-Host":e.host,"X-Sumo-Name":e.sourceName}}},LogglyService:class extends g{getHeaders(){return{"Content-Type":"text/plain"}}},ConsoleService:class{preparePayload(e){return y(this,void 0,void 0,(function*(){return e.map((e=>this.serializer(e)))}))}sendAllLogs(e){return y(this,void 0,void 0,(function*(){console.log(e)}))}destroy(){}serializer(e){return e}},ElasticsearchService:class extends g{preparePayload(e){return t=this,n=void 0,i=function*(){const t=[];return e.forEach((e=>{const n=Object.assign(Object.assign({},this.defaultLogConfig),e);t.push(this.serializer(this.getLogMetaConfig(n[this.serviceConfig.logMetaIndexField||"Index"]))),t.push(this.serializer(n))})),`${t.join("\n")}\n`},new((r=void 0)||(r=Promise))((function(e,o){function s(e){try{u(i.next(e))}catch(e){o(e)}}function a(e){try{u(i.throw(e))}catch(e){o(e)}}function u(t){var n;t.done?e(t.value):(n=t.value,n instanceof r?n:new r((function(e){e(n)}))).then(s,a)}u((i=i.apply(t,n||[])).next())}));var t,n,r,i}getHeaders(){return{"Content-Type":"application/json"}}getLogMetaConfig(e){return{index:{_index:e||"index",_type:"_doc"}}}}}})(),i})()));
//# sourceMappingURL=advanced-logger.browser.min.js.map