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.
@@ -1198,7 +1198,6 @@ var BaseTrace = /** @class */ (function () {
1198
1198
  send(traceSdk.sendMethod, traceSdk.dsn, traceSdk.ltsConfig, data);
1199
1199
  }, traceSdk.sendTimer);
1200
1200
  }
1201
- window.traceSdk = traceSdk;
1202
1201
  return traceSdk;
1203
1202
  };
1204
1203
  return BaseTrace;
@@ -1221,6 +1220,29 @@ var init = function (options) {
1221
1220
  console.log('instances: ', instance);
1222
1221
  return instance;
1223
1222
  };
1223
+ var getInstance = function () {
1224
+ if (!instance) {
1225
+ throw new Error('TraceLog not initialized. Please call init() first.');
1226
+ }
1227
+ return instance;
1228
+ };
1229
+ var index = {
1230
+ init: init,
1231
+ getInstance: getInstance,
1232
+ get info() {
1233
+ return getInstance().info.bind(getInstance());
1234
+ },
1235
+ get warn() {
1236
+ return getInstance().warn.bind(getInstance());
1237
+ },
1238
+ get error() {
1239
+ return getInstance().error.bind(getInstance());
1240
+ },
1241
+ get setCustomGlobalFields() {
1242
+ return getInstance().setCustomGlobalFields.bind(getInstance());
1243
+ }
1244
+ };
1224
1245
 
1225
- export { init, SendMethod, BaseTrace };
1246
+ export default index;
1247
+ export { init, getInstance, SendMethod, BaseTrace };
1226
1248
  //# sourceMappingURL=jason-trace-log.esm.js.map