Safely serializes a value for structured logging, handling:
"[Circular]"
"[Object]"
"[Array]"
"[Buffer(N bytes)]"
"[Function: name]"
"[Symbol: description]"
{ message, stack, name, ...ownProperties }
"...(truncated)"
the value to serialize
Optional
serialization limits
a JSON-safe representation of the value
Safely serializes a value for structured logging, handling:
"[Circular]""[Object]"or"[Array]""[Buffer(N bytes)]""[Function: name]""[Symbol: description]"{ message, stack, name, ...ownProperties }"...(truncated)"