@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.
@@ -3283,7 +3283,7 @@ function set_remote_log_functions(remote_log_fn) {
3283
3283
  ************************************************************/
3284
3284
  function log_stringify(v) {
3285
3285
  try {
3286
- return JSON.stringify(v);
3286
+ return JSON.stringify(v, (k, x) => typeof x === "bigint" ? x.toString() : x);
3287
3287
  } catch (e) {
3288
3288
  try {
3289
3289
  return String(v);
@@ -3344,6 +3344,16 @@ function call_log_function(fn, ...args) {
3344
3344
  } catch (e2) {}
3345
3345
  }
3346
3346
  }
3347
+ var __in_remote_log__ = false;
3348
+ function call_remote_log_function(fn, ...args) {
3349
+ if (__in_remote_log__) return;
3350
+ __in_remote_log__ = true;
3351
+ try {
3352
+ call_log_function(fn, ...args);
3353
+ } finally {
3354
+ __in_remote_log__ = false;
3355
+ }
3356
+ }
3347
3357
  function log_error(format, ...args) {
3348
3358
  let msg = format_log(format, ...args);
3349
3359
  let hora = current_timestamp();
@@ -3352,7 +3362,7 @@ function log_error(format, ...args) {
3352
3362
  if (console_wants("error", msg)) call_log_function(f_error, "%c" + hora + " ERROR: " + String(msg), "color:red");
3353
3363
  } else {
3354
3364
  if (console_wants("error", msg)) _console.error("%c" + hora + " ERROR: " + String(msg), "color:red");
3355
- call_log_function(f_error, `${hora} ERROR: ${String(msg)}`);
3365
+ call_remote_log_function(f_error, `${hora} ERROR: ${String(msg)}`);
3356
3366
  }
3357
3367
  }
3358
3368
  emit_log_callback("error", msg, hora);
@@ -3365,7 +3375,7 @@ function log_warning(format, ...args) {
3365
3375
  if (console_wants("warning", msg)) call_log_function(f_warning, "%c" + hora + " WARNING: " + String(msg), "color:yellow");
3366
3376
  } else {
3367
3377
  if (console_wants("warning", msg)) _console.warn("%c" + hora + " WARNING: " + String(msg), "color:yellow");
3368
- call_log_function(f_warning, `${hora} WARNING: ${String(msg)}`);
3378
+ call_remote_log_function(f_warning, `${hora} WARNING: ${String(msg)}`);
3369
3379
  }
3370
3380
  }
3371
3381
  emit_log_callback("warning", msg, hora);