jason-trace-log 1.0.8 → 1.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/jason-trace-log.esm.js +27 -3
- package/dist/jason-trace-log.esm.js.map +1 -1
- package/dist/jason-trace-log.umd.js +27 -2
- package/dist/jason-trace-log.umd.js.map +1 -1
- package/dist/lib/index.js +28 -2
- package/dist/lib/index.js.map +1 -1
- package/dist/types/index.d.ts +12 -2
- package/package.json +2 -1
|
@@ -1225,10 +1225,35 @@
|
|
|
1225
1225
|
console.log('instances: ', instance);
|
|
1226
1226
|
return instance;
|
|
1227
1227
|
};
|
|
1228
|
-
var
|
|
1228
|
+
var getInstance = function () {
|
|
1229
|
+
if (!instance) {
|
|
1230
|
+
throw new Error('TraceLog not initialized. Please call init() first.');
|
|
1231
|
+
}
|
|
1232
|
+
return instance;
|
|
1233
|
+
};
|
|
1234
|
+
var traceLogAPI = {
|
|
1235
|
+
init: init,
|
|
1236
|
+
getInstance: getInstance,
|
|
1237
|
+
get info() {
|
|
1238
|
+
return getInstance().info.bind(getInstance());
|
|
1239
|
+
},
|
|
1240
|
+
get warn() {
|
|
1241
|
+
return getInstance().warn.bind(getInstance());
|
|
1242
|
+
},
|
|
1243
|
+
get error() {
|
|
1244
|
+
return getInstance().error.bind(getInstance());
|
|
1245
|
+
},
|
|
1246
|
+
get send() {
|
|
1247
|
+
return getInstance().send.bind(getInstance());
|
|
1248
|
+
},
|
|
1249
|
+
get setCustomGlobalFields() {
|
|
1250
|
+
return getInstance().setCustomGlobalFields.bind(getInstance());
|
|
1251
|
+
}
|
|
1252
|
+
};
|
|
1229
1253
|
|
|
1230
1254
|
exports.init = init;
|
|
1231
|
-
exports.
|
|
1255
|
+
exports.getInstance = getInstance;
|
|
1256
|
+
exports.default = traceLogAPI;
|
|
1232
1257
|
exports.BaseTrace = BaseTrace;
|
|
1233
1258
|
|
|
1234
1259
|
Object.defineProperty(exports, '__esModule', { value: true });
|