@spfn/core 0.1.0-alpha.85 → 0.1.0-alpha.88

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.
@@ -104,7 +104,18 @@ function formatConsole(metadata, colorize = true) {
104
104
  }
105
105
  if (metadata.context && Object.keys(metadata.context).length > 0) {
106
106
  Object.entries(metadata.context).forEach(([key, value]) => {
107
- const valueStr = typeof value === "string" ? value : String(value);
107
+ let valueStr;
108
+ if (typeof value === "string") {
109
+ valueStr = value;
110
+ } else if (typeof value === "object" && value !== null) {
111
+ try {
112
+ valueStr = JSON.stringify(value);
113
+ } catch (error) {
114
+ valueStr = "[circular]";
115
+ }
116
+ } else {
117
+ valueStr = String(value);
118
+ }
108
119
  if (colorize) {
109
120
  parts.push(`${COLORS.dim}[${key}=${valueStr}]${COLORS.reset}`);
110
121
  } else {
@@ -2851,6 +2862,7 @@ async function loadRoutes(app, options) {
2851
2862
 
2852
2863
  // src/route/bind.ts
2853
2864
  init_errors();
2865
+ init_logger2();
2854
2866
 
2855
2867
  // src/middleware/error-handler.ts
2856
2868
  init_logger2();