@yuneta/gobj-js 7.26.17 → 7.26.19

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.
@@ -3287,7 +3287,7 @@
3287
3287
  ************************************************************/
3288
3288
  function log_stringify(v) {
3289
3289
  try {
3290
- return JSON.stringify(v);
3290
+ return JSON.stringify(v, (k, x) => typeof x === "bigint" ? x.toString() : x);
3291
3291
  } catch (e) {
3292
3292
  try {
3293
3293
  return String(v);
@@ -3348,6 +3348,16 @@
3348
3348
  } catch (e2) {}
3349
3349
  }
3350
3350
  }
3351
+ var __in_remote_log__ = false;
3352
+ function call_remote_log_function(fn, ...args) {
3353
+ if (__in_remote_log__) return;
3354
+ __in_remote_log__ = true;
3355
+ try {
3356
+ call_log_function(fn, ...args);
3357
+ } finally {
3358
+ __in_remote_log__ = false;
3359
+ }
3360
+ }
3351
3361
  function log_error(format, ...args) {
3352
3362
  let msg = format_log(format, ...args);
3353
3363
  let hora = current_timestamp();
@@ -3356,7 +3366,7 @@
3356
3366
  if (console_wants("error", msg)) call_log_function(f_error, "%c" + hora + " ERROR: " + String(msg), "color:red");
3357
3367
  } else {
3358
3368
  if (console_wants("error", msg)) _console.error("%c" + hora + " ERROR: " + String(msg), "color:red");
3359
- call_log_function(f_error, `${hora} ERROR: ${String(msg)}`);
3369
+ call_remote_log_function(f_error, `${hora} ERROR: ${String(msg)}`);
3360
3370
  }
3361
3371
  }
3362
3372
  emit_log_callback("error", msg, hora);
@@ -3369,7 +3379,7 @@
3369
3379
  if (console_wants("warning", msg)) call_log_function(f_warning, "%c" + hora + " WARNING: " + String(msg), "color:yellow");
3370
3380
  } else {
3371
3381
  if (console_wants("warning", msg)) _console.warn("%c" + hora + " WARNING: " + String(msg), "color:yellow");
3372
- call_log_function(f_warning, `${hora} WARNING: ${String(msg)}`);
3382
+ call_remote_log_function(f_warning, `${hora} WARNING: ${String(msg)}`);
3373
3383
  }
3374
3384
  }
3375
3385
  emit_log_callback("warning", msg, hora);