jason-trace-log 1.0.7 → 1.0.9

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.
@@ -1203,7 +1203,6 @@
1203
1203
  send(traceSdk.sendMethod, traceSdk.dsn, traceSdk.ltsConfig, data);
1204
1204
  }, traceSdk.sendTimer);
1205
1205
  }
1206
- window.traceSdk = traceSdk;
1207
1206
  return traceSdk;
1208
1207
  };
1209
1208
  return BaseTrace;
@@ -1226,8 +1225,32 @@
1226
1225
  console.log('instances: ', instance);
1227
1226
  return instance;
1228
1227
  };
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 index = {
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 setCustomGlobalFields() {
1247
+ return getInstance().setCustomGlobalFields.bind(getInstance());
1248
+ }
1249
+ };
1229
1250
 
1230
1251
  exports.init = init;
1252
+ exports.getInstance = getInstance;
1253
+ exports.default = index;
1231
1254
  exports.BaseTrace = BaseTrace;
1232
1255
 
1233
1256
  Object.defineProperty(exports, '__esModule', { value: true });