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